diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-11 10:25:13 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-11 10:25:13 +0000 |
commit | 09fa481b3181129d4acb02a969abd08ffa753025 (patch) | |
tree | 2aa5e53243aaba58444045242621a89b07566930 /omegle.py | |
parent | 8f3af268d4091fd6488a23480cbfdd9351046f42 (diff) | |
download | omegle-09fa481b3181129d4acb02a969abd08ffa753025.tar.gz omegle-09fa481b3181129d4acb02a969abd08ffa753025.zip |
ibla
git-svn-id: http://xapek.org/svn/common/omegle@1108 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'omegle.py')
-rw-r--r-- | omegle.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,6 @@ import sys import httplib +import socket import urllib import time import json @@ -139,9 +140,15 @@ class OmegleChat(RESTClient): self.logger.error("Cant send message if not is_confirmed") return ###XXX raise?? - params = {'ala':'gaga','id':self.id,'msg':msg,'zla2':'gaga2'} + params = {'id':self.id,'msg':msg} params = urllib.urlencode(params) - r = RESTClient.request(self,"POST","/send",params) + try: + r = RESTClient.request(self,"POST","/send",params) + except Exception,e: + self.logger.error("Error by /send request: %s" % e) + raise e + return + body = r.read() if body != "win": self.logger.error("/send; Bad response %s" % body) |