* src/ReadGedcom.py (importData): Dont crash because of a short line;

svn: r4397
This commit is contained in:
Martin Hawlisch
2005-04-21 12:25:35 +00:00
parent 6fa55ea96b
commit a391f7e96c
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
2005-04-21 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2005-04-21 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/ReadGedcom.py (parse_family_object): Set MediaRef properly; * src/ReadGedcom.py (parse_family_object): Set MediaRef properly;
(parse_individual): Set Adoption event properly (parse_individual): Set Adoption event properly;
(importData): Dont crash because of a short line;
* src/Marriage.py (__init__): Properly get place title * src/Marriage.py (__init__): Properly get place title
2005-04-20 Don Allingham <don@gramps-project.org> 2005-04-20 Don Allingham <don@gramps-project.org>

View File

@ -142,9 +142,9 @@ def importData(database, filename, cb=None, use_trans=True):
line = f.readline().split() line = f.readline().split()
if len(line) == 0: if len(line) == 0:
break break
if line[1] == 'CHAR' and line[2] == "ANSEL": if len(line) > 2 and line[1] == 'CHAR' and line[2] == "ANSEL":
ansel = True ansel = True
if line[1] == 'SOUR' and line[2] == "GRAMPS": if len(line) > 2 and line[1] == 'SOUR' and line[2] == "GRAMPS":
gramps = True gramps = True
f.close() f.close()