Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
stefano-ottolenghi committed Dec 27, 2023
1 parent 80b0f1c commit a2f5626
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python-manual/modules/ROOT/pages/transactions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ def create_customer(driver):
def transfer_to_other_bank(driver, customer_id, other_bank_id, amount):
with driver.session(database="neo4j") as session:
tx = session.begin_transaction()
# or just use a `with` context on `tx` instead of try/finally
try:
with session.begin_transaction() as tx:
if not customer_balance_check(tx, customer_id, amount):
# give up
return
Expand Down

0 comments on commit a2f5626

Please sign in to comment.