8561: Problem with importing ged file from My Heritage
This commit is contained in:
parent
ef0492e0ff
commit
0930c0041f
@ -497,6 +497,8 @@ def time_val(dirpath):
|
||||
if tval_mod > tval:
|
||||
tval = tval_mod
|
||||
last = time.strftime('%x %X', time.localtime(tval))
|
||||
if sys.version_info[0] < 3:
|
||||
last = last.decode(glocale.encoding)
|
||||
else:
|
||||
tval = 0
|
||||
last = _("Never")
|
||||
|
@ -29,6 +29,7 @@ Make an 'Unknown' primary object
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
|
||||
@ -165,9 +166,11 @@ def create_explanation_note(dbase):
|
||||
those objects of type "Unknown" need a explanatory note. This funcion
|
||||
provides such a note for import methods.
|
||||
"""
|
||||
tval = time.strftime('%x %X', time.localtime())
|
||||
if sys.version_info[0] < 3:
|
||||
tval = tval.decode(glocale.encoding)
|
||||
note = Note( _('Objects referenced by this note '
|
||||
'were missing in a file imported on %s.') %
|
||||
time.strftime('%x %X', time.localtime()))
|
||||
'were missing in a file imported on %s.') % tval)
|
||||
note.set_handle(create_id())
|
||||
note.set_gramps_id(dbase.find_next_note_gramps_id())
|
||||
# Use defaults for privacy, format and type.
|
||||
|
@ -2822,7 +2822,12 @@ class GedcomParser(UpdateCallback):
|
||||
else:
|
||||
message = _("GEDCOM import report: %s errors detected") % \
|
||||
self.number_of_errors
|
||||
self.user.info(message, "".join(self.errors), monospaced=True)
|
||||
if hasattr(self.user.uistate, 'window'):
|
||||
parent_window = self.user.uistate.window
|
||||
else:
|
||||
parent_window = None
|
||||
self.user.info(message, "".join(self.errors),
|
||||
parent = parent_window, monospaced=True)
|
||||
|
||||
def __clean_up(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user