From 9d5322103e0db11eb62d8fb9165ff5284a1be242 Mon Sep 17 00:00:00 2001 From: Douglas Blank Date: Sun, 1 May 2016 07:38:31 -0400 Subject: [PATCH] Allow --database to work without installed bsddb3/sqlite3 --- gramps/cli/argparser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gramps/cli/argparser.py b/gramps/cli/argparser.py index 1381116db..035954507 100644 --- a/gramps/cli/argparser.py +++ b/gramps/cli/argparser.py @@ -329,11 +329,12 @@ class ArgParser(object): for plugin in pmgr.get_reg_databases(): pdata = pmgr.get_plugin(plugin.id) mod = pmgr.load_plugin(pdata) - database = getattr(mod, pdata.databaseclass) - summary = database.get_class_summary() - print("Database backend ID:", pdata.id, "(default)" if pdata.id == default else "") - for key in sorted(summary.keys()): - print(" ", "%s:" % key, summary[key]) + if mod: + database = getattr(mod, pdata.databaseclass) + summary = database.get_class_summary() + print("Database backend ID:", pdata.id, "(default)" if pdata.id == default else "") + for key in sorted(summary.keys()): + print(" ", "%s:" % key, summary[key]) sys.exit(0) elif option in ['-c', '--config']: setting_name = value