diff --git a/gramps/cli/argparser.py b/gramps/cli/argparser.py index 47b4e0f4c..337cf113a 100644 --- a/gramps/cli/argparser.py +++ b/gramps/cli/argparser.py @@ -77,7 +77,6 @@ Application options -y, --yes Don't ask to confirm dangerous actions (non-GUI mode only) -q, --quiet Suppress progress indication output (non-GUI mode only) -v, --version Show versions - -b, --databases Show available database backends """) _USAGE = _(""" @@ -154,7 +153,6 @@ class ArgParser: -y, --yes Don't ask to confirm dangerous actions -q, --quiet Suppress progress indication output -v, --version Show versions - -b, --databases Show available database backends -h, --help Display the help --usage Display usage information @@ -325,23 +323,6 @@ class ArgParser: repr(config.data[sect][setting]))) print() sys.exit(0) - elif option in ['-b', '--databases']: - default = config.data["database"]["backend"] - pmgr = BasePluginManager.get_instance() - pmgr.reg_plugins(PLUGINS_DIR, self, None) - pmgr.reg_plugins(USER_PLUGINS, self, None, load_on_reg=True) - for plugin in pmgr.get_reg_databases(): - pdata = pmgr.get_plugin(plugin.id) - mod = pmgr.load_plugin(pdata) - 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']: cfg_name = value set_value = False diff --git a/gramps/plugins/db/bsddb/write.py b/gramps/plugins/db/bsddb/write.py index 82fb5d525..7a352153f 100644 --- a/gramps/plugins/db/bsddb/write.py +++ b/gramps/plugins/db/bsddb/write.py @@ -209,27 +209,6 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback): Gramps database write access object. """ - @classmethod - def get_class_summary(cls): - """ - Return a diction of information about this database. - """ - try: - import bsddb3 as bsddb - bsddb_str = bsddb.__version__ - bsddb_db_str = str(bsddb.db.version()).replace(', ', '.')\ - .replace('(', '').replace(')', '') - except: - bsddb_str = 'not found' - bsddb_db_str = 'not found' - summary = { - "DB-API version": "n/a", - "Database type": cls.__name__, - 'Database version': bsddb_str, - 'Database db version': bsddb_db_str - } - return summary - # Set up dictionary for callback signal handler # --------------------------------------------- # 1. Signals for primary objects diff --git a/gramps/plugins/db/dbapi/dbapi.py b/gramps/plugins/db/dbapi/dbapi.py index 453489436..a925ae379 100644 --- a/gramps/plugins/db/dbapi/dbapi.py +++ b/gramps/plugins/db/dbapi/dbapi.py @@ -57,17 +57,6 @@ class DBAPI(DbGeneric): """ Database backends class for DB-API 2.0 databases """ - @classmethod - def get_class_summary(cls): - """ - Return a diction of information about this database. - """ - summary = { - "DB-API version": "2.0", - "Database type": cls.__name__, - } - return summary - def get_schema_version(self, directory=None): """ Get the version of the schema that the database was created diff --git a/gramps/plugins/db/dbapi/inmemorydb.py b/gramps/plugins/db/dbapi/inmemorydb.py index f431e8d53..0a081d17a 100644 --- a/gramps/plugins/db/dbapi/inmemorydb.py +++ b/gramps/plugins/db/dbapi/inmemorydb.py @@ -29,14 +29,6 @@ class InMemoryDB(DBAPI): """ A DB-API 2.0 In-memory SQL database. """ - @classmethod - def get_class_summary(cls): - summary = DBAPI.get_class_summary() - summary.update({ - "Database location": "in memory", - }) - return summary - def _initialize(self, directory): """ Create an in-memory sqlite database. diff --git a/gramps/plugins/db/dummydb.py b/gramps/plugins/db/dummydb.py index 028f9eed3..c9c561360 100644 --- a/gramps/plugins/db/dummydb.py +++ b/gramps/plugins/db/dummydb.py @@ -210,16 +210,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})): __signals__ = {} - @classmethod - def get_class_summary(cls): - """ - Return a diction of information about this database. - """ - summary = { - "Database type": cls.__name__, - } - return summary - def __init__(self): """ Create a new DummyDb instance.