Skip to content

Commit 79b894d

Browse files
committed
Fix logging crash when timestamp=True for the file handler
1 parent 5fa59e1 commit 79b894d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

reframe/core/logging.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ def _create_file_handler(site_config, config_prefix):
428428
timestamp = site_config.get(f'{config_prefix}/timestamp')
429429
if timestamp:
430430
basename, ext = os.path.splitext(filename)
431+
if not isinstance(timestamp, str):
432+
# Use the default value from `datefmt`
433+
timestamp = site_config.get(f'{config_prefix}/datefmt')
434+
431435
filename = f'{basename}_{time.strftime(timestamp)}{ext}'
432436

433437
append = site_config.get(f'{config_prefix}/append')

0 commit comments

Comments
 (0)