summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-26 17:10:37 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-26 17:10:37 +0000
commit865ab0316a53a32c9caac842bbd54d233cdd2665 (patch)
tree7901dd80922ed8717eec4178cab97fba3b3daf74 /src/connection.py
parentb0b4dd1f0840def1352e34da8528af5e53696112 (diff)
downloadpoezio-865ab0316a53a32c9caac842bbd54d233cdd2665.tar.gz
poezio-865ab0316a53a32c9caac842bbd54d233cdd2665.tar.bz2
poezio-865ab0316a53a32c9caac842bbd54d233cdd2665.tar.xz
poezio-865ab0316a53a32c9caac842bbd54d233cdd2665.zip
nettoyage
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/connection.py b/src/connection.py
index ec1f2552..2ef22425 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -21,7 +21,7 @@ import sys
import xmpp
from config import config
-from logging import log
+from logging import logger
from threading import Thread
from multiuserchat import MultiUserChat
from handler import Handler
@@ -40,23 +40,23 @@ class Connection(Thread):
self.online = 0 # 1:connected, 2:auth confirmed
self.jid = '' # we don't know our jid yet (anon account)
if not self.server:
- log.error('You should set a server in the configuration file')
+ logger.error('You should set a server in the configuration file')
self.port = int(config.get('port'))
if not self.port:
- log.warning('No port set in configuration file, defaulting to 5222')
+ logger.warning('No port set in configuration file, defaulting to 5222')
self.port = 5222
+ self.client = xmpp.Client(self.server, debug=[])
def run(self):
"""
run in a thread
connect to server
"""
- self.client = xmpp.Client(self.server, debug=[])
if not self.connect_to_server(self.server, self.port):
- log.error('Could not connect to server')
+ logger.error('Could not connect to server')
sys.exit(-1)
if not self.authenticate():
- log.error('Could not authenticate to server')
+ logger.error('Could not authenticate to server')
sys.exit(-1)
self.client.sendInitPresence()
self.online = 1 # 2 when confirmation of auth is received