diff --git a/ChangeLog b/ChangeLog index e4b82dab8..901a696f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-02-04 Richard Taylor + * src/GrampsDb/_GrampsGEDDB.py: fix reader/writer import + * ChangeLog: fix the commit of a conflit (Brian ?) + 2007-02-03 Don Allingham * glade/gramps.glade: change window positioning settings * glade/edit_person.glade: change window positioning settings @@ -15,7 +19,7 @@ * src/GrampsDb/Makefile.am: update * src/Makefile.am: update -2007-01-26 Richard Taylor +2007-02-03 Richard Taylor * src/GrampsDb/Makefile.am: remove files * src/GrampsDb/_GrampsDbConst.py: add license * src/GrampsLocale/__init__.py: add license @@ -27,7 +31,7 @@ * src/GrampsDbUtils/_GrampsDbWRFactories.py: add license * src/Makefile.am: add new directories -2007-01-26 Richard Taylor +2007-02-03 Richard Taylor * src/ViewManager.py: refactor GrampsDb and clean RelLib deps * src/Exporter.py: refactor GrampsDb and clean RelLib deps * src/GrampsDb/_WriteGrdb.py: refactor GrampsDb and clean RelLib deps @@ -76,11 +80,6 @@ * src/GrampsLocale.py: refactor GrampsDb and clean RelLib deps * src/DbLoader.py: refactor GrampsDb and clean RelLib deps -======= -2007-02-03 Brian Matherly - * src/plugins/NarrativeWeb.py: fix 0000894: syntax error on Narrative web plugin - ->>>>>>> .merge-right.r8042 2007-02-03 Don Allingham * src/Editors/_EditFamily.py (EditFamily.check_for_family_change): fix warning message. diff --git a/src/GrampsDb/_GrampsGEDDB.py b/src/GrampsDb/_GrampsGEDDB.py index b0add8bf4..f168539cd 100644 --- a/src/GrampsDb/_GrampsGEDDB.py +++ b/src/GrampsDb/_GrampsGEDDB.py @@ -27,9 +27,8 @@ of GEDCOM files. from RelLib import * from _GrampsInMemDB import * +from _GrampsDbExceptions import GrampsDbException -from _ReadGedcom import importData -from _WriteGedcom import GedcomWriter from _DbUtils import db_copy #------------------------------------------------------------------------- @@ -49,6 +48,13 @@ class GrampsGEDDB(GrampsInMemDB): if self.db_is_open: self.close() GrampsInMemDB.load(self,name,callback,mode) + + try: + from GrampsDbUtils._ReadGedcom import importData + except: + log.warning("Failed to load Gedcom reader", exc_info=True) + raise GrampsDbException("Failed to load Gedcom reader") + importData(self,name,callback,use_trans=False) self.bookmarks = GrampsDbBookmarks(self.metadata.get('bookmarks',[])) @@ -60,6 +66,13 @@ class GrampsGEDDB(GrampsInMemDB): GrampsInMemDB.load(self,filename,callback) self.bookmarks = GrampsDbBookmarks(self.metadata.get('bookmarks',[])) self.db_is_open = True + + try: + from GrampsDbUtils._WriteGedcom import GedcomWriter + except: + log.warning("Failed to load Gedcom writer", exc_info=True) + raise GrampsDbException("Failed to load Gedcom writer") + writer = GedcomWriter(self,self.get_default_person(), callback=callback) writer.export_data(self.full_name) @@ -68,6 +81,13 @@ class GrampsGEDDB(GrampsInMemDB): def close(self): if not self.db_is_open: return + + try: + from GrampsDbUtils._WriteGedcom import GedcomWriter + except: + log.warning("Failed to load Gedcom writer", exc_info=True) + raise GrampsDbException("Failed to load Gedcom writer") + if not self.readonly and len(self.undodb) > 0: writer = GedcomWriter(self,self.get_default_person()) writer.export_data(self.full_name)