[tor-commits] [ooni-probe/master] catch ProcessExitedAlready exception during cleanup

art at torproject.org art at torproject.org
Fri Apr 29 09:42:23 UTC 2016


commit 2929098b673542bb6148e61f5cf15a8eba313e00
Author: juga0 <juga>
Date:   Wed Dec 23 16:31:52 2015 +0000

    catch ProcessExitedAlready exception during cleanup
---
 ooni/nettests/third_party/psiphon.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ooni/nettests/third_party/psiphon.py b/ooni/nettests/third_party/psiphon.py
index 9314132..a25e955 100644
--- a/ooni/nettests/third_party/psiphon.py
+++ b/ooni/nettests/third_party/psiphon.py
@@ -3,6 +3,7 @@ import os
 import sys
 
 from twisted.internet import defer, reactor
+from twisted.internet.error import ProcessExitedAlready
 from twisted.python import usage
 
 from ooni.utils import log
@@ -132,7 +133,10 @@ connect(False)
 
         def cleanup(_):
             log.debug('PsiphonTest:cleanup')
-            self.processDirector.transport.signalProcess('INT')
+            try:
+                self.processDirector.transport.signalProcess('INT')
+            except ProcessExitedAlready:
+                pass
             os.remove(self.command[1])
             return finished
 





More information about the tor-commits mailing list