2007-09-19 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDbUtils/_GedcomStageOne.py: empty gedcom gives error message, not crash svn: r8991
This commit is contained in:
parent
9328d1fb4f
commit
0c1abd5a54
@ -1,3 +1,6 @@
|
||||
2007-09-19 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/GrampsDbUtils/_GedcomStageOne.py: empty gedcom gives error message, not crash
|
||||
|
||||
2007-09-17 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
|
||||
* src/glade/gramps.glade: Make labels translatable. #0001035
|
||||
|
||||
|
2
TODO
2
TODO
@ -15,6 +15,8 @@
|
||||
necessarily need multiple notes. Determine which ones should and
|
||||
shouldn't. - DONE
|
||||
|
||||
* before release: fix command line options
|
||||
|
||||
* before release on multiple notes:
|
||||
--> in note view: only show orphaned notes (notes are NOT in remove
|
||||
orphaned notes tool which is what we want )
|
||||
|
@ -58,6 +58,7 @@ LOG = logging.getLogger(".GedcomImport")
|
||||
BAD_UTF16 = _("Your GEDCOM file is corrupted. "
|
||||
"The file appears to be encoded using the UTF16 "
|
||||
"character set, but is missing the BOM marker.")
|
||||
EMPTY_GED = _("Your GEDCOM file is empty.")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -125,6 +126,8 @@ class StageOne:
|
||||
self.enc = "UTF16"
|
||||
input_file.seek(0)
|
||||
return codecs.EncodedFile(input_file, 'utf8', 'utf16')
|
||||
elif not line :
|
||||
raise Errors.GedcomError(EMPTY_GED)
|
||||
elif line[0] == "\x00" or line[1] == "\x00":
|
||||
raise Errors.GedcomError(BAD_UTF16)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user