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

[tor-commits] [ooni-probe/master] Skip the outer loop also on empty measurements



commit ffab2ef266e3facfd0d9a9c5120cda2b8c3a811b
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Wed Oct 12 16:45:03 2016 +0200

    Skip the outer loop also on empty measurements
---
 ooni/nettest.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ooni/nettest.py b/ooni/nettest.py
index 7a2afc8..1bb5678 100644
--- a/ooni/nettest.py
+++ b/ooni/nettest.py
@@ -608,6 +608,11 @@ class NetTest(object):
                     self.state.taskCreated()
                     yield measurement
 
+                # This is to skip setting callbacks on measurements that
+                # cannot be run.
+                if len(measurements) == 0:
+                    continue
+
                 # When the measurement.done callbacks have all fired
                 # call the postProcessor before writing the report
                 if self.report:



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