Include new PostgreSQL error handling in CLI

This commit is contained in:
Nick Hall 2017-09-25 22:52:05 +01:00
parent 2b42dd258e
commit 95376f9eff

View File

@ -59,7 +59,8 @@ from gramps.gen.db.exceptions import (DbUpgradeRequiredError,
BsddbUpgradeRequiredError,
BsddbDowngradeRequiredError,
PythonUpgradeRequiredError,
PythonDowngradeError)
PythonDowngradeError,
DbConnectionError)
from gramps.gen.plug import BasePluginManager
from gramps.gen.utils.config import get_researcher
from gramps.gen.recentfiles import recent_files
@ -201,6 +202,9 @@ class CLIDbLoader:
except DbPythonError as msg:
self.dbstate.no_database()
self._errordialog(_("Cannot open database"), str(msg))
except DbConnectionError as msg:
self.dbstate.no_database()
self._errordialog(_("Cannot open database"), str(msg))
except OSError as msg:
self.dbstate.no_database()
self._errordialog(