Commit 29cd72b7 by Brian Coca

even simpler condition tree for pause

parent dc80bc89
...@@ -115,16 +115,13 @@ class ActionModule(ActionBase): ...@@ -115,16 +115,13 @@ class ActionModule(ActionBase):
while True: while True:
try: try:
if seconds: key_pressed = self._connection._new_stdin.read(1)
key_pressed = self._connection._new_stdin.read(1) if key_pressed == '\x03':
if key_pressed == '\x03': raise KeyboardInterrupt
raise KeyboardInterrupt
else: if not seconds:
# read key presses and act accordingly # read key presses and act accordingly
key_pressed = self._connection._new_stdin.read(1) if key_pressed == '\r':
if key_pressed == '\x03':
raise KeyboardInterrupt
elif key_pressed == '\r':
break break
else: else:
result['user_input'] += key_pressed result['user_input'] += key_pressed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment