aboutsummaryrefslogtreecommitdiffstats
path: root/python-twisted/examples/publish-example.py
diff options
context:
space:
mode:
authorDevendra2013-02-25 21:58:57 +0530
committerDevendra2013-02-25 21:58:57 +0530
commit2238067fbbe3fa6154150095f8a3b4b317a7c7dd (patch)
treec833872dc41a06b64ac173911763e091a7ced6f8 /python-twisted/examples/publish-example.py
parent2ea3826d516fdf10a889e98ffab04a8f1d790650 (diff)
downloadpubnub-python-2238067fbbe3fa6154150095f8a3b4b317a7c7dd.tar.bz2
refactoring
Diffstat (limited to 'python-twisted/examples/publish-example.py')
-rw-r--r--python-twisted/examples/publish-example.py5
1 files changed, 4 insertions, 1 deletions
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
})
## -----------------------------------------------------------------------