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,6 +137,8 @@ try:
except Warning, msg: except Warning, msg:
if str(msg) == 'could not open display': if str(msg) == 'could not open display':
print >> sys.stderr, _('Gajim needs X server to run. Quiting...') print >> sys.stderr, _('Gajim needs X server to run. Quiting...')
else:
print >> sys.stderr, _('importing PyGTK failed: %s') % str(msg)
sys.exit() sys.exit()
warnings.resetwarnings() warnings.resetwarnings()