9538: gramps.gen.dbstate.DbState.make_database doesn't handle 'else' branch
This commit is contained in:
parent
9e5f899bbd
commit
3b0e04fb78
@ -203,6 +203,7 @@ class DbState(Callback):
|
|||||||
else:
|
else:
|
||||||
self.save_modules()
|
self.save_modules()
|
||||||
mod = pmgr.load_plugin(pdata)
|
mod = pmgr.load_plugin(pdata)
|
||||||
|
if mod:
|
||||||
database = getattr(mod, pdata.databaseclass)
|
database = getattr(mod, pdata.databaseclass)
|
||||||
db = database()
|
db = database()
|
||||||
import inspect
|
import inspect
|
||||||
@ -213,6 +214,10 @@ class DbState(Callback):
|
|||||||
+ (os.path.split(caller_frame[1])[1],)
|
+ (os.path.split(caller_frame[1])[1],)
|
||||||
+ tuple(caller_frame[i] for i in range(2, 4))))
|
+ tuple(caller_frame[i] for i in range(2, 4))))
|
||||||
return db
|
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):
|
def open_database(self, dbname, force_unlock=False, callback=None):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user