summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-05-28 10:49:16 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-05-28 10:49:16 +0000
commitc101bbc442950560a17b27bc45cde714ac2c81c7 (patch)
tree359864ea052d3f8c59d50293e24dfcfa567bbf00 /omegle.py
parentc8bb25bf151c95ec4d7254f939d788b84a39cbd2 (diff)
downloadomegle-c101bbc442950560a17b27bc45cde714ac2c81c7.tar.gz
omegle-c101bbc442950560a17b27bc45cde714ac2c81c7.zip
iad
git-svn-id: http://xapek.org/svn/common/omegle@1025 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/omegle.py b/omegle.py
index 9a02fbb..ab3c2d0 100644
--- a/omegle.py
+++ b/omegle.py
@@ -9,6 +9,7 @@ from threading import Thread, Lock
class Timer(Thread):
def __init__(self,func,interval=0.50):
Thread.__init__(self)
+ self.logger = logging.getLogger(__name__ + "." + self.__class__.__name__)
self.func = func
self.interval = interval
@@ -19,6 +20,7 @@ class Timer(Thread):
while self.running:
self.func()
time.sleep(self.interval)
+ self.logger.debug("self.running == False")
def stop(self):
self.running = False
@@ -59,8 +61,8 @@ class OmegleChat(object):
self.timer.start()
def disconnect(self):
+ self.logger.debug("/disconnect")
self.timer.stop()
-
self.conn_lock.acquire()
self.conn.request("POST",
"/disconnect",
@@ -69,6 +71,7 @@ class OmegleChat(object):
r = self.conn.getresponse()
self.conn_lock.release()
body = r.read()
+ self.logger.debug("/disconnect sent. Read: %s" % body)
if body == "win":
self.is_connected = False
else: