summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof <kkszysiu@gmail.com>2011-03-27 16:34:24 +0200
committerKrzysztof <kkszysiu@gmail.com>2011-03-27 16:34:24 +0200
commit0a42861eebd3bcffdf4995001645361ae23d8c88 (patch)
treedaaaebe067caee48259c580e25f8b2432632826b
parent6b867bd11721367c583f99613bde7a789a6cc281 (diff)
Revert "Some fixed and improved logger."
-rw-r--r--sunshine/connection.py5
-rw-r--r--sunshine/contacts_info.py2
-rw-r--r--sunshine/handle.py2
-rwxr-xr-xtelepathy-sunshine3
4 files changed, 3 insertions, 9 deletions
diff --git a/sunshine/connection.py b/sunshine/connection.py
index 40175ee..7ac119f 100644
--- a/sunshine/connection.py
+++ b/sunshine/connection.py
@@ -57,8 +57,6 @@ from sunshine.util.decorator import async, stripHTML, unescape
__all__ = ['GaduClientFactory', 'SunshineConnection']
logger = logging.getLogger('Sunshine.Connection')
-observer = log.PythonLoggingObserver(loggerName='Sunshine.Connection')
-observer.start()
#SSL
ssl_support = False
@@ -452,9 +450,8 @@ class SunshineConnection(telepathy.server.Connection,
telepathy.CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED)
reactor.stop()
- #@async
+ @async
def on_updateContact(self, contact):
- #handle = SunshineHandleFactory(self, 'contact', str(contact.uin))
handle_id = self.get_handle_id_by_name(telepathy.constants.HANDLE_TYPE_CONTACT, str(contact.uin))
handle = self.handle(telepathy.constants.HANDLE_TYPE_CONTACT, handle_id)
logger.info("Status changed for UIN: %s, id: %s, status: %s, description: '%s'" % (contact.uin, handle.id, contact.status, contact.get_desc()))
diff --git a/sunshine/contacts_info.py b/sunshine/contacts_info.py
index 68a65f4..d7e0060 100644
--- a/sunshine/contacts_info.py
+++ b/sunshine/contacts_info.py
@@ -26,7 +26,7 @@ import telepathy
import telepathy.constants
import telepathy.errors
-from twisted.internet import defer
+from twisted.internet.defer import Deferred
from sunshine.handle import SunshineHandleFactory
from sunshine.util.decorator import async
diff --git a/sunshine/handle.py b/sunshine/handle.py
index 23b994a..d26d442 100644
--- a/sunshine/handle.py
+++ b/sunshine/handle.py
@@ -95,7 +95,7 @@ class SunshineSelfHandle(SunshineHandle):
class SunshineContactHandle(SunshineHandle):
#TODO: GG using just UIN to indenrify user so we need just contact_uin instead of contact_account and contact_network)
- def __init__(self, connection, id, contact_account, contact_network=None):
+ def __init__(self, connection, id, contact_account, contact_network):
handle_type = telepathy.HANDLE_TYPE_CONTACT
handle_name = str(contact_account)
self.account = str(contact_account)
diff --git a/telepathy-sunshine b/telepathy-sunshine
index d1dc536..40d401d 100755
--- a/telepathy-sunshine
+++ b/telepathy-sunshine
@@ -6,7 +6,6 @@ import signal
import os
import sys
import logging
-from twisted.python import log
from twisted.internet import gtk2reactor
gtk2reactor.install()
@@ -31,8 +30,6 @@ from sunshine import SunshineDebug
from sunshine.util.decorator import async
logger = logging.getLogger('Sunshine')
-observer = log.PythonLoggingObserver(loggerName='Sunshine')
-observer.start()
IDLE_TIMEOUT = 5000
PROCESS_NAME = 'telepathy-sunshine'