9538: gramps.gen.dbstate.DbState.make_database doesn't handle 'else' branch

This commit is contained in:
Doug Blank 2016-09-23 17:07:12 -04:00
parent 9e5f899bbd
commit 3b0e04fb78

View File

@ -203,6 +203,7 @@ class DbState(Callback):
else:
self.save_modules()
mod = pmgr.load_plugin(pdata)
if mod:
database = getattr(mod, pdata.databaseclass)
db = database()
import inspect
@ -213,6 +214,10 @@ class DbState(Callback):
+ (os.path.split(caller_frame[1])[1],)
+ tuple(caller_frame[i] for i in range(2, 4))))
return db
else:
raise Exception("can't load database backend: '%s'" % plugin_id)
else:
raise Exception("no such database backend: '%s'" % plugin_id)
def open_database(self, dbname, force_unlock=False, callback=None):
"""