catch correctly exception if user has problems with gconfd
This commit is contained in:
parent
992aa5c22b
commit
9498889fa0
|
@ -1335,9 +1335,7 @@ if __name__ == '__main__':
|
||||||
import gconf
|
import gconf
|
||||||
# in try because daemon may not be there
|
# in try because daemon may not be there
|
||||||
client = gconf.client_get_default()
|
client = gconf.client_get_default()
|
||||||
except:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
we_set = False
|
we_set = False
|
||||||
if gajim.config.get('set_xmpp://_handler_everytime'):
|
if gajim.config.get('set_xmpp://_handler_everytime'):
|
||||||
we_set = True
|
we_set = True
|
||||||
|
@ -1355,6 +1353,8 @@ if __name__ == '__main__':
|
||||||
client.set_bool('/desktop/gnome/url-handlers/xmpp/enabled', True)
|
client.set_bool('/desktop/gnome/url-handlers/xmpp/enabled', True)
|
||||||
client.set_string('/desktop/gnome/url-handlers/xmpp/command', command)
|
client.set_string('/desktop/gnome/url-handlers/xmpp/command', command)
|
||||||
client.set_bool('/desktop/gnome/url-handlers/xmpp/needs_terminal', False)
|
client.set_bool('/desktop/gnome/url-handlers/xmpp/needs_terminal', False)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
Interface()
|
Interface()
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
|
@ -57,11 +57,11 @@ def get_default_font():
|
||||||
import gconf
|
import gconf
|
||||||
# in try because daemon may not be there
|
# in try because daemon may not be there
|
||||||
client = gconf.client_get_default()
|
client = gconf.client_get_default()
|
||||||
except:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return helpers.ensure_unicode_string(
|
return helpers.ensure_unicode_string(
|
||||||
client.get_string('/desktop/gnome/interface/font_name'))
|
client.get_string('/desktop/gnome/interface/font_name'))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# try to get xfce default font
|
# try to get xfce default font
|
||||||
# Xfce 4.2 adopts freedesktop.org's Base Directory Specification
|
# Xfce 4.2 adopts freedesktop.org's Base Directory Specification
|
||||||
|
|
Loading…
Reference in New Issue