From 2238067fbbe3fa6154150095f8a3b4b317a7c7dd Mon Sep 17 00:00:00 2001 From: Devendra Date: Mon, 25 Feb 2013 21:58:57 +0530 Subject: refactoring --- python-twisted/examples/publish-example.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python-twisted/examples/publish-example.py') diff --git a/python-twisted/examples/publish-example.py b/python-twisted/examples/publish-example.py index 9c3be60..d09ad8d 100644 --- a/python-twisted/examples/publish-example.py +++ b/python-twisted/examples/publish-example.py @@ -48,11 +48,14 @@ pubnub.publish({ 'callback' : publish_complete }) +def done_cb(info): + publish_complete(info) + reactor.stop() ## Publish Dictionary Object pubnub.publish({ 'channel' : crazy, 'message' : { 'some_key' : 'some_val' }, - 'callback' : publish_complete + 'callback' : done_cb }) ## ----------------------------------------------------------------------- -- cgit v1.2.3