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

[tor-commits] [ooni-probe/master] Fix test_runtime key value



commit 23669a79bfb6b402a0332b68eb8383bc13251aea
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Mon Sep 5 16:29:29 2016 +0200

    Fix test_runtime key value
    
    * This closes: https://github.com/TheTorProject/ooni-probe/issues/598
---
 ooni/tasks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ooni/tasks.py b/ooni/tasks.py
index 925089b..3a7c949 100644
--- a/ooni/tasks.py
+++ b/ooni/tasks.py
@@ -110,8 +110,6 @@ class Measurement(TaskWithTimeout):
         """
         self.testInstance = test_instance
         self.testInstance.input = test_input
-        if not hasattr(self.testInstance, '_start_time'):
-            self.testInstance._start_time = time.time()
 
         self.testInstance.setUp()
         if 'input' not in self.testInstance.report.keys():
@@ -139,6 +137,8 @@ class Measurement(TaskWithTimeout):
     def run(self):
         if 'measurement_start_time' not in self.testInstance.report.keys():
             self.testInstance.report['measurement_start_time'] = otime.timestampNowLongUTC()
+        if not hasattr(self.testInstance, '_start_time'):
+            self.testInstance._start_time = time.time()
         return self.netTestMethod()
 
 



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