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

[tor-commits] [ooni-probe/master] Fix to make the psiphon test run



commit c8e624436c1d8e0160116d80c5e6eb8ad3d4abc6
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Wed Dec 9 17:34:51 2015 +0100

    Fix to make the psiphon test run
    
    * Remove unneeded imports
---
 ooni/nettests/third_party/psiphon.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/ooni/nettests/third_party/psiphon.py b/ooni/nettests/third_party/psiphon.py
index 543e856..fb912a9 100644
--- a/ooni/nettests/third_party/psiphon.py
+++ b/ooni/nettests/third_party/psiphon.py
@@ -1,19 +1,12 @@
 import tempfile
-import stat
 import os
 import sys
 
 from twisted.internet import defer, reactor
-from twisted.internet.endpoints import TCP4ClientEndpoint
-from twisted.web.client import readBody
 from twisted.python import usage
 
-from txsocksx.http import SOCKS5Agent
-
-from ooni.errors import handleAllFailures, TaskTimedOut
 from ooni.utils import log
 from ooni.templates import process, httpt
-from ooni.templates.process import ProcessTest
 
 
 class UsageOptions(usage.Options):
@@ -94,9 +87,9 @@ connect(False)
     def test_psiphon(self):
         log.debug('PsiphonTest.test_psiphon')
 
+        self.report['success'] = None
         if not os.path.exists(self.psiphonpath):
             log.err('psiphon path does not exists, is it installed?')
-            self.report['success'] = False
             self.report['psiphon_installed'] = False
             log.debug("Adding %s to report" % self.report)
             # XXX: the original code written by juga0 readed
@@ -116,7 +109,8 @@ connect(False)
         # full with some block size and therefore the test would
         # terminate with error
         finished = self.run(self.command,
-                            env=dict(PYTHONPATH=self.psiphonpath),
+                            env=dict(PYTHONPATH=os.path.join(self.psiphonpath,
+                                                             'pyclient')),
                             path=self.psiphonpath,
                             usePTY=1)
 



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