Skip to content

Commit b906fe5

Browse files
committed
If the server shuts down, self._connection is None.
1 parent 72b1801 commit b906fe5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

neo4j/v1/session.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ def __run__(self, statement, parameters):
4747
result.statement = statement
4848
result.parameters = parameters
4949

50-
self._connection.append(RUN, (statement, parameters), response=run_response)
51-
self._connection.append(PULL_ALL, response=pull_all_response)
50+
try:
51+
self._connection.append(RUN, (statement, parameters), response=run_response)
52+
self._connection.append(PULL_ALL, response=pull_all_response)
53+
except AttributeError:
54+
pass
5255

5356
return result
5457

0 commit comments

Comments
 (0)