Handle exceptions in a way that doesn't make python 2.5 really angry
This commit is contained in:
parent
714425dfbe
commit
a13581a4c8
|
@ -85,7 +85,7 @@ class PluginRegistry(borg.Borg):
|
|||
if item not in self.instances:
|
||||
func = getattr(module, item)
|
||||
self.instances[item] = func()
|
||||
except Exception as e:
|
||||
except Exception, e:
|
||||
err('PluginRegistry::load_plugins: Importing plugin %s \
|
||||
failed: %s' % (plugin, e))
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ class Terminal(gtk.VBox):
|
|||
self.matches[name] = self.vte.match_add(match)
|
||||
dbg('Terminal::update_matches: added plugin URL handler \
|
||||
for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
err('Terminal::update_url_matches: %s' % ex)
|
||||
|
||||
def connect_signals(self):
|
||||
|
@ -895,7 +895,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
|||
%s plugin' % urlplugin.handler_name)
|
||||
url = newurl
|
||||
break;
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
err('Terminal::prepare_url: %s' % ex)
|
||||
|
||||
return(url)
|
||||
|
|
|
@ -166,7 +166,7 @@ class TerminalPopupMenu(object):
|
|||
menuplugin.callback(menuitems, menu, terminal)
|
||||
for menuitem in menuitems:
|
||||
menu.append(menuitem)
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
err('TerminalPopupMenu::show: %s' % ex)
|
||||
|
||||
menu.show_all()
|
||||
|
|
Loading…
Reference in New Issue