commit 528ace6a2eec664d86bca38214462d9874b370e2
Author: Arturo Filastò <art...@filasto.net>
Date:   Fri Oct 14 12:38:07 2016 +0200

    Ensure annotations are always dicts
---
 ooni/nettest.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ooni/nettest.py b/ooni/nettest.py
index 5d33342..b81678b 100644
--- a/ooni/nettest.py
+++ b/ooni/nettest.py
@@ -171,6 +171,9 @@ class NetTestLoader(object):
     def __init__(self, options, test_file=None, test_string=None,
                  annotations={}):
         self.options = options
+        # Ensure annotations are always dicts
+        if not isinstance(annotations, dict):
+            annotations = {}
         self.annotations = annotations
         self.annotations['platform'] = self.annotations.get('platform',
                                                             config.platform)



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

Reply via email to