[tor-commits] [arm/master] fix: uncaught keyboard interrupt exceptions
atagar at torproject.org
atagar at torproject.org
Mon Sep 19 17:01:05 UTC 2011
commit 5ae0195c30785e7bef1ca34e5ae8c1ac058623a8
Author: Damian Johnson <atagar at torproject.org>
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)
More information about the tor-commits
mailing list