From 9498889fa05d0185eba7a9b24f74ad59cc73b38d Mon Sep 17 00:00:00 2001
From: Nikos Kouremenos <kourem@gmail.com>
Date: Thu, 13 Oct 2005 19:44:33 +0000
Subject: [PATCH] catch correctly exception if user has problems with gconfd

---
 src/gajim.py          | 6 +++---
 src/gtkgui_helpers.py | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index d191f03fa5..ba6cc52ea9 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -1335,9 +1335,7 @@ if __name__ == '__main__':
 			import gconf
 			# in try because daemon may not be there
 			client = gconf.client_get_default()
-		except:
-			pass
-		else:
+		
 			we_set = False
 			if gajim.config.get('set_xmpp://_handler_everytime'):
 				we_set = True
@@ -1355,6 +1353,8 @@ if __name__ == '__main__':
 					client.set_bool('/desktop/gnome/url-handlers/xmpp/enabled', True)
 					client.set_string('/desktop/gnome/url-handlers/xmpp/command', command)
 					client.set_bool('/desktop/gnome/url-handlers/xmpp/needs_terminal', False)
+		except:
+			pass
 	
 	Interface()
 	gtk.main()
diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py
index aef73d4179..7d47dcbac7 100644
--- a/src/gtkgui_helpers.py
+++ b/src/gtkgui_helpers.py
@@ -57,11 +57,11 @@ def get_default_font():
 		import gconf
 		# in try because daemon may not be there
 		client = gconf.client_get_default()
-	except:
-		pass
-	else:
+
 		return helpers.ensure_unicode_string(
 			client.get_string('/desktop/gnome/interface/font_name'))
+	except:
+		pass
 
 	# try to get xfce default font
 	# Xfce 4.2 adopts freedesktop.org's Base Directory Specification
-- 
GitLab