diff options
Diffstat (limited to 'src/gtkgui_helpers.py')
-rw-r--r-- | src/gtkgui_helpers.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 83cdad0ba..4cdef98fb 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -141,7 +141,7 @@ def get_default_font(): return client.get_string('/desktop/gnome/interface/font_name' ).decode('utf-8') - except: + except Exception: pass # try to get xfce default font @@ -161,7 +161,7 @@ def get_default_font(): if line.find('name="Gtk/FontName"') != -1: start = line.find('value="') + 7 return line[start:line.find('"', start)].decode('utf-8') - except: + except Exception: #we talk about file print >> sys.stderr, _('Error: cannot open %s for reading') % xfce_config_file @@ -176,7 +176,7 @@ def get_default_font(): font_size = values[1] font_string = '%s %s' % (font_name, font_size) # Verdana 9 return font_string.decode('utf-8') - except: + except Exception: #we talk about file print >> sys.stderr, _('Error: cannot open %s for reading') % kde_config_file @@ -650,10 +650,10 @@ def decode_filechooser_file_paths(file_paths): for file_path in file_paths: try: file_path = file_path.decode(sys.getfilesystemencoding()) - except: + except Exception: try: file_path = file_path.decode('utf-8') - except: + except Exception: pass file_paths_list.append(file_path) @@ -713,7 +713,7 @@ Description=xmpp import gconf # in try because daemon may not be there client = gconf.client_get_default() - except: + except Exception: return old_command = client.get_string('/desktop/gnome/url-handlers/xmpp/command') |