Skip to content

Commit 249adc1

Browse files
authored
Improved example in readme (#152)
1 parent 4ef4093 commit 249adc1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,8 @@ try:
234234
# ...
235235
# and finally...
236236
txn.commit()
237-
except Exception as e:
238-
if isinstance(e, pydgraph.AbortedError):
239-
# Retry or handle exception.
240-
else:
241-
raise e
237+
except pydgraph.AbortedError:
238+
# Retry or handle exception.
242239
finally:
243240
# Clean up. Calling this after txn.commit() is a no-op
244241
# and hence safe.

0 commit comments

Comments
 (0)