From cd5a9f1d308ddfaf5a8dc47260d919ccbe2e7551 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 17 Feb 2004 18:06:18 +0000 Subject: [PATCH] --- core/core.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/core/core.py b/core/core.py index dcb4afd20..45db2c5db 100644 --- a/core/core.py +++ b/core/core.py @@ -137,10 +137,10 @@ class GajimCore: self.hub.sendPlugin('STATUS', 'offline') self.hub.sendPlugin('WARNING', "Couldn't connect to %s" % hostname) return 0 - except self.con.socket.gaierror, e: + except common.xmlstream.socket.error, e: log.debug("Couldn't connect to %s %s" % (hostname, e)) self.hub.sendPlugin('STATUS', 'offline') - self.hub.sendPlugin('WARNING', "Couldn't connect to %s" % hostname) + self.hub.sendPlugin('WARNING', "Couldn't connect to %s : %s" % (hostname, e)) return 0 else: log.debug("Connected to server") @@ -178,13 +178,13 @@ class GajimCore: self.con.disconnect() self.hub.sendPlugin('QUIT', ()) return - #('ASK_CONFIG', section) + #('ASK_CONFIG', (who_ask, section)) elif ev[0] == 'ASK_CONFIG': - if ev[1] == 'accounts': - self.hub.sendPlugin('CONFIG', self.accounts) + if ev[1][1] == 'accounts': + self.hub.sendPlugin('CONFIG', (ev[1][0], self.accounts)) else: - self.hub.sendPlugin('CONFIG', \ - self.cfgParser.__getattr__(ev[1])) + self.hub.sendPlugin('CONFIG', (ev[1][0], \ + self.cfgParser.__getattr__(ev[1][1]))) #('CONFIG', (section, config)) elif ev[0] == 'CONFIG': if ev[1][0] == 'accounts': @@ -329,4 +329,9 @@ def start(): gc.con.disconnect() gc.hub.sendPlugin('QUIT', ()) return 0 +# except: +# print "Erreur survenue" +# if gc.connected: +# gc.con.disconnect() +# gc.hub.sendPlugin('QUIT', ()) # END start