diff options
Diffstat (limited to 'python/examples/dev-console.py')
| -rwxr-xr-x | python/examples/dev-console.py | 6 | 
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 | 
