-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlD+p5MACgkQrlYvE4MpobP2bgCg1aKd9Pq45EWp40M/glL721fw 4Y0AoJWPzFoJ27hjITe0HeRAjgcRE6Fr =NA88 -----END PGP SIGNATURE-----
>From dfea02cc63234f1180229217e91190b446922d1f Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Mon, 5 Nov 2012 14:59:46 -0500 Subject: [PATCH 51/84] policycoreutils: gui: system-config-selinux: Catch no DISPLAY= error Better error/crash if run without DISPLAY set. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- policycoreutils/gui/system-config-selinux.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/policycoreutils/gui/system-config-selinux.py b/policycoreutils/gui/system-config-selinux.py index 85e8b7f..bc3027e 100644 --- a/policycoreutils/gui/system-config-selinux.py +++ b/policycoreutils/gui/system-config-selinux.py @@ -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 -- 1.8.1