Skip to content

Commit d6eea8e

Browse files
authored
Avoid TypeError in Transaction.__repr__ (#703)
Only add isolation to repr if it's not None
1 parent a308a97 commit d6eea8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

asyncpg/transaction.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def __repr__(self):
234234
attrs = []
235235
attrs.append('state:{}'.format(self._state.name.lower()))
236236

237-
attrs.append(self._isolation)
237+
if self._isolation is not None:
238+
attrs.append(self._isolation)
238239
if self._readonly:
239240
attrs.append('readonly')
240241
if self._deferrable:

0 commit comments

Comments
 (0)