aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/msec/msecgui.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/msec/msecgui.py b/src/msec/msecgui.py
index 27878c6..fe512e6 100755
--- a/src/msec/msecgui.py
+++ b/src/msec/msecgui.py
@@ -9,11 +9,18 @@ import string
import getopt
# PyGTK
-import gtk
-#import gtk.glade
-import pygtk
-import gobject
-import pango
+import warnings
+warnings.filterwarnings('error', module='gtk')
+try:
+ import gtk
+ import pygtk
+ import gobject
+ import pango
+except Warning, e:
+ print "ERROR: %s" % e
+ print "Exiting.."
+ sys.exit(1)
+warnings.resetwarnings()
# config
import config