Check for non-existent files - remove try/except

This commit is contained in:
Sam Manzi 2016-04-30 12:02:30 +10:00
parent 1c0823bc23
commit 820e981012
No known key found for this signature in database
GPG Key ID: F4A16068AE36B402

View File

@ -1127,13 +1127,13 @@ class GedcomInfoDB(object):
self.standard = GedcomDescription("GEDCOM 5.5 standard")
self.standard.set_dest("GEDCOM 5.5")
try:
filepath = os.path.join(DATA_DIR, "gedcom.xml")
if not os.path.exists(filepath):
return
with open(filepath, "rb") as ged_file:
parser = GedInfoParser(self)
parser.parse(ged_file)
except:
return
def add_description(self, name, obj):
self.map[name] = obj