diff --git a/src/config.py b/src/config.py index 3c5fe69ff..37fba2332 100644 --- a/src/config.py +++ b/src/config.py @@ -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') diff --git a/src/roster_window.py b/src/roster_window.py index ee23ada8f..aa1eb512c 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1174,8 +1174,12 @@ class Roster_window: if self.plugin.windows[account].has_key('disco'): self.plugin.windows[account]['disco'].window.present() else: - self.plugin.windows[account]['disco'] = \ - config.Service_discovery_window(self.plugin, account) + try: + self.plugin.windows[account]['disco'] = \ + config.Service_discovery_window(self.plugin, account) + except RuntimeError: + pass + def load_iconset(self, path): imgs = {}