better pygtk failure code

This commit is contained in:
Yann Leboulanger 2009-07-30 19:21:23 +02:00
parent 228f6dc6be
commit c740177956
1 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,9 @@ try:
except Warning, msg:
if str(msg) == 'could not open display':
print >> sys.stderr, _('Gajim needs X server to run. Quiting...')
sys.exit()
else:
print >> sys.stderr, _('importing PyGTK failed: %s') % str(msg)
sys.exit()
warnings.resetwarnings()
if os.name == 'nt':