Skip to content

Commit 9d162dc

Browse files
committed
check if self.engine exists before calling dispose in close()
1 parent 3dddd3d commit 9d162dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rdflib_sqlalchemy/store.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ def close(self, commit_pending_transaction=False):
253253
Close the current store engine connection if one is open.
254254
255255
"""
256-
self.engine.dispose()
256+
if self.engine:
257+
self.engine.dispose()
257258
self.engine = None
258259

259260
def destroy(self, configuration):

0 commit comments

Comments
 (0)