diff options
| -rw-r--r-- | python-tornado/Pubnub.py | 2 | ||||
| -rw-r--r-- | python-tornado/examples/publish-example.py | 1 | ||||
| -rw-r--r-- | python-tornado/unassembled/Platform.py | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/python-tornado/Pubnub.py b/python-tornado/Pubnub.py index a65b2b3..268cd6a 100644 --- a/python-tornado/Pubnub.py +++ b/python-tornado/Pubnub.py @@ -728,7 +728,7 @@ class Pubnub(PubnubCoreAsync): if response.error is not None: with ExceptionStackContext(handle_exc): response.rethrow() - else: + elif callback: callback(eval(response._get_body())) self.http.fetch( diff --git a/python-tornado/examples/publish-example.py b/python-tornado/examples/publish-example.py index 72f2586..b9eaa15 100644 --- a/python-tornado/examples/publish-example.py +++ b/python-tornado/examples/publish-example.py @@ -13,6 +13,7 @@ import sys import tornado sys.path.append('../') sys.path.append('../..') +sys.path.append('../../common') from Pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' diff --git a/python-tornado/unassembled/Platform.py b/python-tornado/unassembled/Platform.py index 4df04b3..7565fd2 100644 --- a/python-tornado/unassembled/Platform.py +++ b/python-tornado/unassembled/Platform.py @@ -57,7 +57,7 @@ class Pubnub(PubnubCoreAsync): if response.error is not None: with ExceptionStackContext(handle_exc): response.rethrow() - else: + elif callback: callback(eval(response._get_body())) self.http.fetch( |
