Browse Source

Changed exception handling when disposing engine

ogert 4 years ago
parent
commit
51ead65f7a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      cdplib/db_handlers/SQLHandler.py

+ 3 - 3
cdplib/db_handlers/SQLHandler.py

@@ -637,7 +637,7 @@ class SQLHandler:
 
     def dispose_engine(self):
         try:
-            if self._engine.closed:
-                self._engine.dispose()
+            self._engine.dispose()
         except Exception as e:
-            self._log.log_and_raise_error(('An error occured when trying to dispose the SQL engine. Error: {}').format(e))
+            self._log.error(('An error occured when trying to dispose the SQL engine. Error: {}').format(e))
+            raise Exception(e)