policycoreutils: gui: system-config-selinux: Catch no DISPLAY= error
Better error/crash if run without DISPLAY set. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
8904ffe4de
commit
dd6c619ccb
1 changed files with 8 additions and 2 deletions
|
@ -22,12 +22,18 @@
|
|||
#
|
||||
import signal
|
||||
import string
|
||||
import gtk
|
||||
import sys
|
||||
try:
|
||||
import gtk
|
||||
except RuntimeError, e:
|
||||
print "system-config-selinux:", e
|
||||
print "This is a graphical application and requires DISPLAY to be set."
|
||||
sys.exit (1)
|
||||
|
||||
import gtk.glade
|
||||
import os
|
||||
import gobject
|
||||
import gnome
|
||||
import sys
|
||||
import statusPage
|
||||
import booleansPage
|
||||
import loginsPage
|
||||
|
|
Loading…
Reference in a new issue