Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2003-12-02 15:39:28 +0300
committerYann Leboulanger <asterix@lagaule.org>2003-12-02 15:39:28 +0300
commit11f74c9e30506e3ea6b3c464f0c1d1a23f5052bf (patch)
tree2b4eab1d8a6035da02524dcd18f8f03a1112f97a /core
parentfd9c01fc4f4df48e4369587eb1b89d19a169eb2b (diff)
improvements, status messages in chat window
Diffstat (limited to 'core')
-rw-r--r--core/core.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/core.py b/core/core.py
index dab503896..fb04a5734 100644
--- a/core/core.py
+++ b/core/core.py
@@ -78,11 +78,11 @@ class GajimCore:
log.debug("unsubscribe request from %s" % who)
elif type == 'unsubscribed':
log.debug("we are now unsubscribed to %s" % who)
-
# END presenceCB
def disconnectedCB(self, con):
log.debug("disconnectedCB")
+ self.con.disconnect()
# END disconenctedCB
def connect(self, account):
@@ -95,14 +95,15 @@ class GajimCore:
try:
self.con.connect()
except IOError, e:
- log.debug("Couldn't connect to %s" % e)
- sys.exit(0)
+ log.debug("Couldn't connect to %s %s" % (hostname, e))
+ return 0
else:
log.debug("Connected to server")
self.con.setMessageHandler(self.messageCB)
self.con.setPresenceHandler(self.presenceCB)
self.con.setDisconnectHandler(self.disconnectedCB)
+ #BUG in jabberpy library : if hostname is wrong : "boucle"
if self.con.auth(name, password, ressource):
self.con.requestRoster()
roster = self.con.getRoster().getRaw()
@@ -112,7 +113,8 @@ class GajimCore:
self.con.sendInitPresence()
self.connected = 1
else:
- sys.exit(1)
+ log.debug("Couldn't authentificate to %s" % hostname)
+ return 0
# END connect
def mainLoop(self):