From f7b89bfafae34fa22509c1d1c59d1284ec62c5df Mon Sep 17 00:00:00 2001 From: Devendra Date: Wed, 23 Apr 2014 21:35:06 +0530 Subject: exception handling changes --- python-twisted/examples/here-now-example.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'python-twisted/examples') diff --git a/python-twisted/examples/here-now-example.py b/python-twisted/examples/here-now-example.py index bba7d21..14f45c4 100644 --- a/python-twisted/examples/here-now-example.py +++ b/python-twisted/examples/here-now-example.py @@ -10,7 +10,8 @@ ## ----------------------------------- import sys -from twisted.internet import reactor +sys.path.append('..') +sys.path.append('../../common') from Pubnub import Pubnub publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo' @@ -32,14 +33,12 @@ crazy = 'hello_world' def here_now_complete(messages): print(messages) - reactor.stop() + pubnub.stop() -pubnub.here_now({ - 'channel': crazy, - 'callback': here_now_complete -}) +pubnub.here_now( + channel=crazy, callback=here_now_complete, error=here_now_complete) ## ----------------------------------------------------------------------- ## IO Event Loop ## ----------------------------------------------------------------------- -reactor.run() +pubnub.start() -- cgit v1.2.3