diff options
author | mrDoctorWho <mrdoctorwho@gmail.com> | 2013-09-22 16:08:34 +0400 |
---|---|---|
committer | mrDoctorWho <mrdoctorwho@gmail.com> | 2013-09-22 16:08:34 +0400 |
commit | 94e1592a7717c9f632c8087d465af9964fbbf686 (patch) | |
tree | c1ae0ac94ebb234a0746cb73de6ac401902f7371 /library | |
parent | ebc8d9fd2e55d23d262bf3dcf3140c5d09a5e43d (diff) |
readme update, captcha fix
Diffstat (limited to 'library')
-rw-r--r-- | library/vkApi.py | 2 | ||||
-rw-r--r-- | library/xmpp/client.py | 4 | ||||
-rw-r--r-- | library/xmpp/dispatcher.py | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/library/vkApi.py b/library/vkApi.py index ad426ea..223ede2 100644 --- a/library/vkApi.py +++ b/library/vkApi.py @@ -3,7 +3,6 @@ import re, time import ssl, urllib, urllib2, cookielib, webtools, json -import traceback class RequestProcessor(object): @@ -36,7 +35,6 @@ class RequestProcessor(object): raise RuntimeError response = self.Opener.open(request, timeout = timeout) except (urllib2.URLError, ssl.SSLError): - traceback.print_exc() retryCount += 1 response = self.open(request, timeout, retryCount) except RuntimeError: diff --git a/library/xmpp/client.py b/library/xmpp/client.py index d539308..7d750f3 100644 --- a/library/xmpp/client.py +++ b/library/xmpp/client.py @@ -103,7 +103,7 @@ class CommonClient: self.disconnect_handlers=[] self.Server=server self.Port=port - if debug and type(debug)<>list: debug=['always', 'nodebuilder'] + if debug and isinstance(debug , list): debug=['always', 'nodebuilder'] self._DEBUG=Debug.Debug(debug) self.DEBUG=self._DEBUG.Show self.debug_flags=self._DEBUG.debug_flags @@ -203,7 +203,7 @@ class Client(CommonClient): If you want to disable tls/ssl support completely, set it to 0. Example: connect(('192.168.5.5',5222),{'host':'proxy.my.net','port':8080,'user':'me','password':'secret'}) Returns '' or 'tcp' or 'tls', depending on the result.""" - if not CommonClient.connect(self,server,proxy,secure,use_srv) or secure<>None and not secure: return self.connected + if not CommonClient.connect(self,server,proxy,secure,use_srv) or secure != None and not secure: return self.connected transports.TLS().PlugIn(self) if not hasattr(self, "Dispatcher"): return None diff --git a/library/xmpp/dispatcher.py b/library/xmpp/dispatcher.py index 56ac5f1..ba7609a 100644 --- a/library/xmpp/dispatcher.py +++ b/library/xmpp/dispatcher.py @@ -305,6 +305,7 @@ class Dispatcher(PlugIn): session.DEBUG("Expected stanza arrived. Callback %s(%s) found!"%(cb,args),'ok') try: cb(session,stanza,**args) except NodeProcessed: pass + except: raise #except Exception, typ: #if typ.__class__.__name__ != 'NodeProcessed': raise else: |