prevent AttributeError

If os.path.isfile(sqlite_cache_file) is False, the Attribute cache_connection was not assigned and so an Attribute Error occured in the following lines.
This commit is contained in:
Sebastian Niklasch 2019-10-15 10:34:12 +02:00 committed by Nyall Dawson
parent a7c766e41e
commit 1a45936595

View File

@ -108,6 +108,8 @@ class OracleDBConnector(DBConnector):
self.cache_connection = sqlite3.connect(sqlite_cache_file)
except sqlite3.Error:
self.cache_connection = False
else:
self.cache_connection = False
# Find if there is cache for our connection:
if self.cache_connection: