Command-line import from gedcom: cleanup

svn: r1544
This commit is contained in:
Alex Roitman
2003-05-19 19:58:52 +00:00
parent c4e62d273a
commit 1d660a389f
2 changed files with 21 additions and 9 deletions

View File

@@ -938,9 +938,13 @@ class Gramps:
import ReadGedcom
filename = os.path.normpath(os.path.abspath(filename))
try:
ReadGedcom.importData(self.db,filename)
g = ReadGedcom.GedcomParser(self.db,filename,None)
g.parse_gedcom_file()
g.resolve_refns()
del g
except:
print "Error importing %s" % filename
os._exit(1)
elif format == 'gramps':
try:
dbname = os.path.join(filename,const.xmlFile)