[tor-commits] [stem/master] Handling EOF responses when awaiting input

atagar at torproject.org atagar at torproject.org
Tue May 6 01:21:13 UTC 2014


commit 9d933b1717abbc5f52f74e640bcb9beabf43ec06
Author: Damian Johnson <atagar at torproject.org>
Date:   Mon Apr 7 10:16:08 2014 -0700

    Handling EOF responses when awaiting input
    
    Handling for ctrl+d on the prompt.
---
 stem/interpretor/__init__.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/interpretor/__init__.py b/stem/interpretor/__init__.py
index 72fba90..9d08676 100644
--- a/stem/interpretor/__init__.py
+++ b/stem/interpretor/__init__.py
@@ -62,6 +62,6 @@ def main():
       try:
         user_input = raw_input(PROMPT)
         print controller.msg(user_input)
-      except KeyboardInterrupt as exc:
+      except (KeyboardInterrupt, EOFError) as exc:
         print  # move cursor to the following line
         break





More information about the tor-commits mailing list