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

[tor-commits] [stem/master] Dropping duplicate stop() call



commit f60e3272f78acdc3c66c07f897688d1e3a381ca3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Dec 21 08:19:10 2012 -0800

    Dropping duplicate stop() call
    
    The test runner is ran within a finally block that calls() stop. Reguardless of
    if tor fails to start or not stop() will be called, so this call was a
    duplicate.
    
    Calling stop() multiple times is fine (the method is idempotent), but it logs
    each time so we were saying "Shutting down tor... done" twice. It's still
    possible for us to give double messages in some other use cases so we should
    address this more generally later, though I'm not sure offhand what that fix
    should be.
---
 test/runner.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/test/runner.py b/test/runner.py
index 760c6c5..9cdf509 100644
--- a/test/runner.py
+++ b/test/runner.py
@@ -306,7 +306,6 @@ class Runner(object):
         if CONFIG["integ.target.relative_data_dir"]:
           os.chdir(original_cwd)
       except OSError, exc:
-        self.stop()
         raise exc
   
   def stop(self):

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