[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/master] fix: uncaught keyboard interrupt exceptions



commit 5ae0195c30785e7bef1ca34e5ae8c1ac058623a8
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Sep 19 08:15:51 2011 -0700

    fix: uncaught keyboard interrupt exceptions
    
    KeyboardInterrupt isn't an Exception subclass (wtf?), causing a previous change
    to fetch the exception object to result in keyboard interrupts being uncaught.
---
 src/util/torInterpretor.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py
index 593f29c..e6b2e52 100644
--- a/src/util/torInterpretor.py
+++ b/src/util/torInterpretor.py
@@ -904,7 +904,7 @@ def prompt():
     try:
       input = raw_input(prompt)
       _, outputEntry = interpretor.handleQuery(input)
-    except Exception, exc:
+    except (KeyboardInterrupt, Exception), exc:
       if isinstance(exc, InterpretorClosed) and str(exc):
         print format(str(exc), *ERROR_FORMAT)
       



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits