Skip to content

Commit

Permalink
prevent AttributeError
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sNiklasch authored and nirvn committed Oct 26, 2019
1 parent 7f728ba commit 593ddd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/plugins/db_manager/db_plugins/oracle/connector.py
Expand Up @@ -108,6 +108,8 @@ def __init__(self, uri, connName):
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:
Expand Down

0 comments on commit 593ddd7

Please sign in to comment.