2008-02-27 Brian Matherly <brian@gramps-project.org>
* src/GrampsDbUtils/_ReadXML.py: Don't allow newer Gramps files to be imported (#0001722). svn: r10130
This commit is contained in:
parent
44000e4b96
commit
202e0356d7
@ -1,3 +1,7 @@
|
|||||||
|
2008-02-27 Brian Matherly <brian@gramps-project.org>
|
||||||
|
* src/GrampsDbUtils/_ReadXML.py:
|
||||||
|
Don't allow newer Gramps files to be imported (#0001722).
|
||||||
|
|
||||||
2008-02-27 Stéphane Charette <stephanecharette@gmail.com>
|
2008-02-27 Stéphane Charette <stephanecharette@gmail.com>
|
||||||
* src/plugins/GVFamilyLines.py:
|
* src/plugins/GVFamilyLines.py:
|
||||||
0001549: use standard date formats for FamilyLines
|
0001549: use standard date formats for FamilyLines
|
||||||
|
@ -37,7 +37,7 @@ import re
|
|||||||
# Gramps Modules
|
# Gramps Modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from QuestionDialog import ErrorDialog, QuestionDialog2
|
from QuestionDialog import ErrorDialog
|
||||||
import Mime
|
import Mime
|
||||||
import gen.lib
|
import gen.lib
|
||||||
import Utils
|
import Utils
|
||||||
@ -2206,21 +2206,14 @@ def version_is_valid(filename, cli):
|
|||||||
if parser.get_xmlns_version() > _GrampsDbWriteXML.XML_VERSION:
|
if parser.get_xmlns_version() > _GrampsDbWriteXML.XML_VERSION:
|
||||||
msg = _("The .gramps file you are importing was made by version %s of "
|
msg = _("The .gramps file you are importing was made by version %s of "
|
||||||
"GRAMPS, while you are running an older version %s. "
|
"GRAMPS, while you are running an older version %s. "
|
||||||
"The file might include parts which cannot be understood by "
|
"The file will not be imported. Please upgrade to the latest "
|
||||||
"this version of GRAMPS and will be discarded upon import."
|
"version of GRAMPS and try again."
|
||||||
) % (parser.get_gramps_version(), const.VERSION)
|
) % (parser.get_gramps_version(), const.VERSION)
|
||||||
if cli:
|
if cli:
|
||||||
print msg
|
print msg
|
||||||
print _('Enter "Yes" to continue with import.')
|
|
||||||
response = sys.stdin.read()
|
|
||||||
if response not in ["Yes", "yes"]:
|
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
prompt = QuestionDialog2( _("Import Newer File?"), msg,
|
ErrorDialog(msg)
|
||||||
_("Continue with import"),
|
|
||||||
_("Do not import newer file") )
|
|
||||||
response = prompt.run()
|
|
||||||
if response is False:
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user