[tor-commits] [ooni-probe/master] catch ProcessExitedAlready exception during cleanup
commit 2929098b673542bb6148e61f5cf15a8eba313e00 Author: juga0 Date: Wed Dec 23 16:31:52 2015 + 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 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [ooni-probe/master] catch ProcessExitedAlready exception during cleanup
commit 23e22f9e9d1821ad052687d3956f4a35b591f336 Author: juga0 Date: Wed Dec 23 16:31:52 2015 + 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 ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits