Check for non-existent files - remove try/except
This commit is contained in:
parent
1c0823bc23
commit
820e981012
@ -1127,14 +1127,14 @@ class GedcomInfoDB(object):
|
|||||||
self.standard = GedcomDescription("GEDCOM 5.5 standard")
|
self.standard = GedcomDescription("GEDCOM 5.5 standard")
|
||||||
self.standard.set_dest("GEDCOM 5.5")
|
self.standard.set_dest("GEDCOM 5.5")
|
||||||
|
|
||||||
try:
|
filepath = os.path.join(DATA_DIR, "gedcom.xml")
|
||||||
filepath = os.path.join(DATA_DIR, "gedcom.xml")
|
if not os.path.exists(filepath):
|
||||||
with open(filepath, "rb") as ged_file:
|
|
||||||
parser = GedInfoParser(self)
|
|
||||||
parser.parse(ged_file)
|
|
||||||
except:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
with open(filepath, "rb") as ged_file:
|
||||||
|
parser = GedInfoParser(self)
|
||||||
|
parser.parse(ged_file)
|
||||||
|
|
||||||
def add_description(self, name, obj):
|
def add_description(self, name, obj):
|
||||||
self.map[name] = obj
|
self.map[name] = obj
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user