* src/gramps_main.py: if error and terminate, don't show family manager before exit
* src/gramps.py: terminate if wrong python version 2007-10-20 Benny Malengier <benny.malengier@gramps-project.org> svn: r9221
This commit is contained in:
parent
fb0a6779d2
commit
022596af8a
@ -1,3 +1,7 @@
|
|||||||
|
2007-10-20 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
|
* src/gramps_main.py: if error and terminate, don't show family manager before exit
|
||||||
|
* src/gramps.py: terminate if wrong python version
|
||||||
|
|
||||||
2007-10-20 Benny Malengier <benny.malengier@gramps-project.org>
|
2007-10-20 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/gramps_main.py: terminate if wrong python version
|
* src/gramps_main.py: terminate if wrong python version
|
||||||
|
|
||||||
|
@ -90,6 +90,23 @@ except:
|
|||||||
gettext.textdomain("gramps")
|
gettext.textdomain("gramps")
|
||||||
gettext.install("gramps",loc,unicode=1)
|
gettext.install("gramps",loc,unicode=1)
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Minimum version check
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
MIN_PYTHON_VERSION = (2, 5, 0, '', 0)
|
||||||
|
if not sys.version_info >= MIN_PYTHON_VERSION :
|
||||||
|
print gettext.gettext("Your Python version does not meet the "
|
||||||
|
"requirements. At least python %d.%d.%d is needed to"
|
||||||
|
" start GRAMPS.\n\n"
|
||||||
|
"GRAMPS will terminate now.") % (
|
||||||
|
MIN_PYTHON_VERSION[0],
|
||||||
|
MIN_PYTHON_VERSION[1],
|
||||||
|
MIN_PYTHON_VERSION[2])
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# gramps libraries
|
# gramps libraries
|
||||||
|
@ -207,22 +207,8 @@ class Gramps:
|
|||||||
process. It may spawn several windows and control several databases.
|
process. It may spawn several windows and control several databases.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MIN_PYTHON_VERSION = (2, 5, 0, '', 0)
|
|
||||||
|
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
stopload = False
|
stopload = False
|
||||||
import sys
|
|
||||||
if not sys.version_info >= Gramps.MIN_PYTHON_VERSION :
|
|
||||||
ErrorDialog(_("Wrong Python version"),
|
|
||||||
_("Your Python version does not meet the "
|
|
||||||
"requirements. At least python %d.%d.%d is needed to"
|
|
||||||
" start GRAMPS.\n\n"
|
|
||||||
"GRAMPS will terminate now.") % (
|
|
||||||
Gramps.MIN_PYTHON_VERSION[0],
|
|
||||||
Gramps.MIN_PYTHON_VERSION[1],
|
|
||||||
Gramps.MIN_PYTHON_VERSION[2]))
|
|
||||||
gtk.main_quit()
|
|
||||||
stopload = True
|
|
||||||
try:
|
try:
|
||||||
build_user_paths()
|
build_user_paths()
|
||||||
self.welcome()
|
self.welcome()
|
||||||
@ -256,6 +242,8 @@ class Gramps:
|
|||||||
self.vm.register_view(view)
|
self.vm.register_view(view)
|
||||||
|
|
||||||
if stopload:
|
if stopload:
|
||||||
|
# We stop further loading so family tree manager is not shown
|
||||||
|
# before the exit of GRAMPS
|
||||||
return
|
return
|
||||||
|
|
||||||
self.vm.init_interface()
|
self.vm.init_interface()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user