def __loadDB(): import sqlite3 global __db shouldCreateTables = not os.path.exists(Plugin.__databasePath) __db = sqlite3.connect(Plugin.__databasePath) if shouldCreateTables: try: Plugin.__call(Plugin.__pluginModule.CreateTables) Commit() Log.Add("(Framework) Created database tables") except AttributeError: Log.Add("(Framework) Error creating database tables", False) pass