aboutsummaryrefslogtreecommitdiffstats
path: root/python/examples/console.py
diff options
context:
space:
mode:
authorDevendra2014-06-25 06:39:09 +0530
committerDevendra2014-06-25 06:39:09 +0530
commit0fb857c8faf7de9e868690f6af163e29de753a96 (patch)
tree0764c5bf7b7ad8be21e83107d5ccfc2f6ab40512 /python/examples/console.py
parent9217c4f7fdfb36cc67121d1ab173a1e2305c7a35 (diff)
downloadpubnub-python-0fb857c8faf7de9e868690f6af163e29de753a96.tar.bz2
[fixes #71067290 develop python] fixing error message when subscribing to -pnpres channel
Diffstat (limited to 'python/examples/console.py')
-rw-r--r--python/examples/console.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/examples/console.py b/python/examples/console.py
index d9087c0..45ac8e4 100644
--- a/python/examples/console.py
+++ b/python/examples/console.py
@@ -316,7 +316,10 @@ def get_channel_array():
for channel in channels:
if "-pnpres" in channel:
- i = channels.index(channel.split("-pnpres")[0])
+ chname = channel.split("-pnpres")[0]
+ if chname not in channels:
+ continue
+ i = channels.index(chname)
channels[i] = channels[i] + color.colorize("(P)", "blue")
channels.remove(channel)
return channels