Add a failsafe to have the program start with an empty database if the database file was messed with.

This commit is contained in:
AccentuSoft
2022-01-06 18:34:04 +02:00
parent ccba744103
commit 36d6a08836

View File

@@ -41,6 +41,10 @@ class EntitiesDB:
except FileNotFoundError:
self.messageHandler.info('Creating new Local Entities Database.')
self.database = nx.DiGraph()
except Exception as exc:
self.messageHandler.error('Cannot parse Database: ' + str(exc) + "\nCreating new Local Entities Database.",
popUp=True)
self.database = nx.DiGraph()
finally:
self.dbLock.release()