Skip to content
Snippets Groups Projects

Ignore all exceptions when closing the session

Merged Amir MOHAMMADI requested to merge p1 into master
1 file
+ 1
4
Compare changes
  • Side-by-side
  • Inline
@@ -35,10 +35,7 @@ class Database(Database):
@@ -35,10 +35,7 @@ class Database(Database):
# which might fail in some conditions, e.g., when this destructor is called during the exit of the python interpreter
# which might fail in some conditions, e.g., when this destructor is called during the exit of the python interpreter
self.session.close()
self.session.close()
self.session.bind.dispose()
self.session.bind.dispose()
except TypeError:
except Exception:
# ... I can just ignore the according exception...
pass
except AttributeError:
pass
pass
def connect(self):
def connect(self):
Loading