[tor-commits] [stem/master] Quietly stopping integ launch on ctrl+c

atagar at torproject.org atagar at torproject.org
Thu Oct 27 03:30:03 UTC 2011


commit 52768d36f85083923c4f09a1b0956ee146ae0b16
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Oct 21 07:33:40 2011 -0700

    Quietly stopping integ launch on ctrl+c
    
    Keyboard interrupts while launching tor would result in a stacktrace. Quietly
    exiting instead since this isn't really an issue.
---
 test/runner.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/test/runner.py b/test/runner.py
index c795ea8..246fd79 100644
--- a/test/runner.py
+++ b/test/runner.py
@@ -101,6 +101,8 @@ class Runner:
       self._tor_process = stem.process.launch_tor(self.get_torrc_path(), print_init_line)
       print term.format("  done (%i seconds)" % (time.time() - start_time), term.Color.BLUE, term.Attr.BOLD)
       return
+    except KeyboardInterrupt:
+      sys.exit(1) # quietly terminate
     except OSError, exc:
       print term.format("  failed to start tor: %s" % exc, term.Color.RED, term.Attr.BOLD)
       raise exc





More information about the tor-commits mailing list