Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in exception handler #72

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/subunit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def _handleTime(self, offset, line):
event_time = iso8601.parse_date(line[offset:-1].decode())
except TypeError:
raise TypeError(_u("Failed to parse %r, got %r")
% (line, sys.exec_info[1]))
% (line, sys.exc_info()[1]))
Comment on lines 576 to +578
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could probably replace this with:

except TypeError as e:
    raise TypeError(_u("Failed to parse %r, got %r") % (line, e)))

but this is obviously also correct and what was there didn't work, so lets just make the smaller fix

self.client.time(event_time)

def lineReceived(self, line):
Expand Down