commit af03b561539e48c3dc13cc76a8b03699757f80ed Author: Arturo Filastò art@fuffa.org Date: Thu Jun 13 12:56:35 2013 +0200
Fix two minor bugs --- ooni/oonicli.py | 2 +- ooni/tasks.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ooni/oonicli.py b/ooni/oonicli.py index c64710e..354cebc 100644 --- a/ooni/oonicli.py +++ b/ooni/oonicli.py @@ -159,7 +159,7 @@ def runWithDirector(): yaml_reporter = YAMLReporter(test_details) reporters = [yaml_reporter]
- if collector and collector.startswith('httpo') \ + if collector and collector.startswith('httpo:') \ and (not (config.tor_state or config.tor.socks_port)): raise errors.TorNotRunning elif collector: diff --git a/ooni/tasks.py b/ooni/tasks.py index 428fdbf..89c2d5e 100644 --- a/ooni/tasks.py +++ b/ooni/tasks.py @@ -69,7 +69,7 @@ class TaskWithTimeout(BaseTask):
def _timedOut(self): """Internal method for handling timeout failure""" - if not self._running.called: + if self._running and not self._running.called: self._running.cancel() self._failed(TaskTimedOut)
@@ -92,6 +92,7 @@ class TaskWithTimeout(BaseTask):
class Measurement(TaskWithTimeout): timeout = config.advanced.measurement_timeout + netTest = None
def __init__(self, test_class, test_method, test_input): """