2007-09-19 Benny Malengier <benny.malengier@gramps-project.org>

* src/GrampsDb/_ReadGedcom.py: empty gedcom gives error message, not crash



svn: r8990
This commit is contained in:
Benny Malengier 2007-09-19 07:38:37 +00:00
parent ca1ee037c5
commit 4f23d05e5b
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
2007-09-19 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: empty gedcom gives error message, not crash
2007-09-13 Benny Malengier <benny.malengier@gramps-project.org>
* src/Exporter.py: temporarely fix bug invalid filename. This has been
completely rewritten for 3.0

View File

@ -2219,7 +2219,7 @@ class GedcomParser(UpdateCallback):
def parse_header_head(self):
"""validiates that this is a valid GEDCOM file"""
line = self.lexer.read()
if line[1] != TOKEN_HEAD:
if not line or line[1] != TOKEN_HEAD:
raise Errors.GedcomError("%s is not a GEDCOM file" % self.filename)
def parse_header_source(self):