Use GrampsImportError in stead of GedcomError

svn: r16766
This commit is contained in:
Michiel Nauta 2011-03-06 18:43:55 +00:00
parent b10d52a3bf
commit 97b1604269

View File

@ -90,7 +90,7 @@ def importData(database, filename, cb_progress=None):
except EnvironmentError, msg: except EnvironmentError, msg:
ErrorDialog(_("%s could not be opened\n") % filename, str(msg)) ErrorDialog(_("%s could not be opened\n") % filename, str(msg))
return return
except Errors.GedcomError, msg: except Errors.GrampsImportError, msg:
ErrorDialog(_("%s could not be opened\n") % filename, str(msg)) ErrorDialog(_("%s could not be opened\n") % filename, str(msg))
return return
@ -326,8 +326,8 @@ class VCardParser(object):
"""Check the version of the VCard, only version 3.0 is supported.""" """Check the version of the VCard, only version 3.0 is supported."""
self.version = data self.version = data
if self.version != "3.0": if self.version != "3.0":
raise Errors.GedcomError(_("Import of VCards version %s is not " raise Errors.GrampsImportError(_("Import of VCards version %s is "
"supported by Gramps.") % self.version) "not supported by Gramps.") % self.version)
def add_formatted_name(self, fields, data): def add_formatted_name(self, fields, data):
"""Read the FN property of a VCard.""" """Read the FN property of a VCard."""