fixing a traceback with disco menuitem
see http://nkour.blogspot.com/2005/05/pythons-init-return-none-doesnt-return.html for more
This commit is contained in:
parent
0d4084ead7
commit
9152f128e7
|
@ -1600,6 +1600,7 @@ class Service_discovery_window:
|
|||
self.agent_infos = {}
|
||||
if gajim.connections[account].connected < 2:
|
||||
dialogs.Error_dialog(_('You must be connected to browse services'))
|
||||
raise RuntimeError, 'You must be connected to browse services'
|
||||
return
|
||||
xml = gtk.glade.XML(GTKGUI_GLADE, 'service_discovery_window', APP)
|
||||
self.window = xml.get_widget('service_discovery_window')
|
||||
|
|
|
@ -1174,8 +1174,12 @@ class Roster_window:
|
|||
if self.plugin.windows[account].has_key('disco'):
|
||||
self.plugin.windows[account]['disco'].window.present()
|
||||
else:
|
||||
try:
|
||||
self.plugin.windows[account]['disco'] = \
|
||||
config.Service_discovery_window(self.plugin, account)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
|
||||
def load_iconset(self, path):
|
||||
imgs = {}
|
||||
|
|
Loading…
Reference in New Issue