diff --git a/ChangeLog b/ChangeLog index 442db1a8c..514069117 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-07-14 Don Allingham + * src/DbLoader.py (DbLoader.read_file): handle DBAccessError + 2006-07-12 Brian Matherly * src/ReportBase/_CommandLineReport.py: missing import - CustomFilters * src/plugins/NarrativeWeb.py: HTML validation fixes diff --git a/src/DbLoader.py b/src/DbLoader.py index b17a20704..19f879c0f 100644 --- a/src/DbLoader.py +++ b/src/DbLoader.py @@ -30,6 +30,7 @@ Handling of loading new/existing databases. # #------------------------------------------------------------------------- import os +from bsddb.db import DBAccessError from gettext import gettext as _ import logging log = logging.getLogger(".") @@ -397,6 +398,10 @@ class DbLoader: os.chdir(os.path.dirname(filename)) except: print "could not change directory" + except DBAccessError, msg: + QuestionDialog.ErrorDialog( + _("Could not open file: %s") % filename, + str(msg[1])) except Exception: log.error("Failed to open database.", exc_info=True)