diff options
Diffstat (limited to 'python-twisted')
| -rw-r--r-- | python-twisted/Pubnub.py | 7 | ||||
| -rw-r--r-- | python-twisted/unassembled/Platform.py | 7 | 
2 files changed, 6 insertions, 8 deletions
| diff --git a/python-twisted/Pubnub.py b/python-twisted/Pubnub.py index 94d2624..efbbfd9 100644 --- a/python-twisted/Pubnub.py +++ b/python-twisted/Pubnub.py @@ -868,10 +868,9 @@ from twisted.python.compat import (  pnconn_pool = HTTPConnectionPool(reactor, persistent=True)  pnconn_pool.maxPersistentPerHost = 100000 -pnconn_pool.cachedConnectionTimeout = 310 +pnconn_pool.cachedConnectionTimeout = 15  pnconn_pool.retryAutomatically = True -  class Pubnub(PubnubCoreAsync):      def start(self): @@ -937,11 +936,11 @@ class Pubnub(PubnubCoreAsync):          def received(response):              if not isinstance(response, twisted.web._newclient.Response): -                _invoke(error, {"message": "Not Found"}) +                _invoke(error, {"message" : "Not Found"})                  return              finished = Deferred() -            if response.code in [401, 403]: +            if response.code in [401,403]:                  response.deliverBody(PubNubPamResponse(finished))              else:                  response.deliverBody(PubNubResponse(finished)) diff --git a/python-twisted/unassembled/Platform.py b/python-twisted/unassembled/Platform.py index a9e811b..b220257 100644 --- a/python-twisted/unassembled/Platform.py +++ b/python-twisted/unassembled/Platform.py @@ -21,10 +21,9 @@ from twisted.python.compat import (  pnconn_pool = HTTPConnectionPool(reactor, persistent=True)  pnconn_pool.maxPersistentPerHost = 100000 -pnconn_pool.cachedConnectionTimeout = 310 +pnconn_pool.cachedConnectionTimeout = 15  pnconn_pool.retryAutomatically = True -  class Pubnub(PubnubCoreAsync):      def start(self): @@ -90,11 +89,11 @@ class Pubnub(PubnubCoreAsync):          def received(response):              if not isinstance(response, twisted.web._newclient.Response): -                _invoke(error, {"message": "Not Found"}) +                _invoke(error, {"message" : "Not Found"})                  return              finished = Deferred() -            if response.code in [401, 403]: +            if response.code in [401,403]:                  response.deliverBody(PubNubPamResponse(finished))              else:                  response.deliverBody(PubNubResponse(finished)) | 
