Skip to content

Commit cdf381c

Browse files
author
Vasileios Karakasis
committed
Remove unnecessary try/except block
1 parent 1e6be58 commit cdf381c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

reframe/core/logging.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,11 @@ def formatTime(self, record, datefmt=None):
152152

153153
def format(self, record):
154154
datefmt = self.datefmt or self.default_time_format
155-
try:
156-
if record.check_job_completion_time is not None:
157-
ct = self.converter(record.check_job_completion_time)
158-
record.check_job_completion_time = _format_time_rfc3339(
159-
ct, datefmt
160-
)
161-
except AttributeError:
162-
pass
155+
if record.check_job_completion_time is not None:
156+
ct = self.converter(record.check_job_completion_time)
157+
record.check_job_completion_time = _format_time_rfc3339(
158+
ct, datefmt
159+
)
163160

164161
return super().format(record)
165162

0 commit comments

Comments
 (0)