Skip to content

Commit

Permalink
Avoid TypeError in Transaction.__repr__ (#703)
Browse files Browse the repository at this point in the history
Only add isolation to repr if it's not None
  • Loading branch information
BeatButton authored Mar 8, 2021
1 parent a308a97 commit d6eea8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asyncpg/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ def __repr__(self):
attrs = []
attrs.append('state:{}'.format(self._state.name.lower()))

attrs.append(self._isolation)
if self._isolation is not None:
attrs.append(self._isolation)
if self._readonly:
attrs.append('readonly')
if self._deferrable:
Expand Down

0 comments on commit d6eea8e

Please sign in to comment.