Skip to content

Commit

Permalink
t/fiotestlib: use f-string for formatting
Browse files Browse the repository at this point in the history
Take advantage of running on modern Python versions and use an f-string
for formatting.

Signed-off-by: Vincent Fu <[email protected]>
  • Loading branch information
vincentkfu committed Jun 8, 2023
1 parent 1cf0ba9 commit 6544f1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions t/fiotestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ def check_result(self):
self.failure_reason = f"{self.failure_reason} timeout,"
else:
assert self.output['failure'] == 'exception'
self.failure_reason = '{0} exception: {1}, {2}'.format(
self.failure_reason, self.output['exc_info'][0],
self.output['exc_info'][1])
self.failure_reason = f'{self.failure_reason} exception: ' + \
f'{self.output["exc_info"][0]}, {self.output["exc_info"][1]}'

self.passed = False
return
Expand Down

0 comments on commit 6544f1a

Please sign in to comment.