From 52c51378b4647911a64c8d4b1c759756d4930d4b Mon Sep 17 00:00:00 2001 From: Devendra Date: Sun, 6 Oct 2013 17:38:16 +0530 Subject: included changes of pull request # 4 --- python-tornado/Pubnub.py | 2 +- python-tornado/examples/publish-example.py | 1 + python-tornado/unassembled/Platform.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'python-tornado') 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( -- cgit v1.2.3