Skip to content

Commit f960b41

Browse files
author
Zhen
committed
Refine the code after review
1 parent 0845925 commit f960b41

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

neo4j/v1/api.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,8 @@ def is_retriable_transientError(error):
467467
"""
468468
:type error: TransientError
469469
"""
470-
if (error.code != "Neo.TransientError.Transaction.Terminated"
471-
and error.code != "Neo.TransientError.Transaction.LockClientStopped"):
472-
return True
473-
else:
474-
return False
470+
return not (error.code in ("Neo.TransientError.Transaction.Terminated",
471+
"Neo.TransientError.Transaction.LockClientStopped"))
475472

476473

477474
class Transaction(object):

0 commit comments

Comments
 (0)