From 69240816755406b26b364f37ca521fdb269581d1 Mon Sep 17 00:00:00 2001 From: Devendra Date: Wed, 23 Apr 2014 02:28:42 +0530 Subject: fixed error on missing channel --- python/examples/dev-console.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/examples/dev-console.py') 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 -- cgit v1.2.3