Check to see if gtk is valid; 'import gtk' used to raise an exception, now init_check does (should return boolean - pygtk bug reported #637877)
svn: r16306
This commit is contained in:
@@ -283,6 +283,7 @@ def __startgramps(errors, argparser):
|
|||||||
try:
|
try:
|
||||||
quit_now = False
|
quit_now = False
|
||||||
exit_code = 0
|
exit_code = 0
|
||||||
|
gtk.init_check()
|
||||||
Gramps(argparser)
|
Gramps(argparser)
|
||||||
|
|
||||||
except SystemExit, e:
|
except SystemExit, e:
|
||||||
@@ -300,6 +301,13 @@ def __startgramps(errors, argparser):
|
|||||||
fn = ""
|
fn = ""
|
||||||
LOG.error("Gramps terminated because of OS Error\n" +
|
LOG.error("Gramps terminated because of OS Error\n" +
|
||||||
"Error details: %s %s" % (repr(e), fn), exc_info=True)
|
"Error details: %s %s" % (repr(e), fn), exc_info=True)
|
||||||
|
|
||||||
|
except RuntimeError, e:
|
||||||
|
quit_now = True
|
||||||
|
exit_code = e[0] or 1
|
||||||
|
print("Gramps terminated because of no DISPLAY")
|
||||||
|
sys.exit(exit_code)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
quit_now = True
|
quit_now = True
|
||||||
exit_code = 1
|
exit_code = 1
|
||||||
|
Reference in New Issue
Block a user