From 1a45936595ceb4109db61e3c439b4aaa8dbf717c Mon Sep 17 00:00:00 2001 From: Sebastian Niklasch Date: Tue, 15 Oct 2019 10:34:12 +0200 Subject: [PATCH] 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. --- python/plugins/db_manager/db_plugins/oracle/connector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/plugins/db_manager/db_plugins/oracle/connector.py b/python/plugins/db_manager/db_plugins/oracle/connector.py index b5747c2f8d5..42a466f1008 100644 --- a/python/plugins/db_manager/db_plugins/oracle/connector.py +++ b/python/plugins/db_manager/db_plugins/oracle/connector.py @@ -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: