aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevendra2014-04-23 02:28:42 +0530
committerDevendra2014-04-23 02:28:42 +0530
commit69240816755406b26b364f37ca521fdb269581d1 (patch)
tree07b6554f919dcc4a5b8a27305b13efbcd3afcb9c
parentb2f1e0ed2337b61073a595eaf36afd718a21a3fe (diff)
downloadpubnub-python-69240816755406b26b364f37ca521fdb269581d1.tar.bz2
fixed error on missing channel
-rwxr-xr-xpython/examples/dev-console.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/examples/dev-console.py b/python/examples/dev-console.py
index c4c6bc8..adade8f 100755
--- a/python/examples/dev-console.py
+++ b/python/examples/dev-console.py
@@ -110,6 +110,12 @@ def get_input(message, t=None):
command = input(message)
except KeyboardInterrupt:
return None
+
+ command = command.strip()
+
+ if command is None or len(command) == 0:
+ raise ValueError
+
if t is not None and t == bool:
if command in ["True", "true", "1", 1, "y", "Y", "yes", "Yes", "YES"]:
return True