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:
Dan Walsh 2012-11-05 14:59:46 -05:00 committed by Eric Paris
parent 8904ffe4de
commit dd6c619ccb

View File

@ -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