Gramps does not check [for] installed DB backend on DB selector

Fixes #10148
This commit is contained in:
Paul Franklin 2017-08-10 22:13:34 -07:00
parent 3311224e48
commit 7719e995e0

View File

@ -21,16 +21,23 @@ from gramps.gen.plug._pluginreg import register, STABLE, DATABASE
from gramps.gen.const import GRAMPS_LOCALE as glocale from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext _ = glocale.translation.gettext
register(DATABASE, try:
id='postgresql', import psycopg2
name=_('PostgreSQL'), available = True
name_accell=_('_PostgreSQL Database'), except (ImportError, ValueError):
description=_('PostgreSQL Database'), available = False
version='1.0.0',
gramps_target_version='5.0', if available:
status=STABLE, register(DATABASE,
fname='postgresql.py', id='postgresql',
databaseclass='PostgreSQL', name=_('PostgreSQL'),
authors=['Doug Blank'], name_accell=_('_PostgreSQL Database'),
authors_email=['doug.blank@gmail.com'] description=_('PostgreSQL Database'),
) version='1.0.0',
gramps_target_version='5.0',
status=STABLE,
fname='postgresql.py',
databaseclass='PostgreSQL',
authors=['Doug Blank'],
authors_email=['doug.blank@gmail.com']
)