[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Use a string for the control_resolver key
commit 13e5670c17d88fb9d69050756e931f41ddf8fcbd
Author: aagbsn <aagbsn@xxxxxxxx>
Date: Mon Oct 14 09:24:56 2013 +0000
Use a string for the control_resolver key
If a tuple is used as the report key, it will break the yaml parser.
---
ooni/nettests/blocking/dnsconsistency.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ooni/nettests/blocking/dnsconsistency.py b/ooni/nettests/blocking/dnsconsistency.py
index d883434..302866a 100644
--- a/ooni/nettests/blocking/dnsconsistency.py
+++ b/ooni/nettests/blocking/dnsconsistency.py
@@ -77,7 +77,7 @@ class DNSConsistencyTest(dnst.DNSTest):
dns_ip, dns_port = self.localOptions['backend'].split(':')
self.control_dns_server = (str(dns_ip), int(dns_port))
- self.report['control_resolver'] = self.control_dns_server
+ self.report['control_resolver'] = "%s:%d" % self.control_dns_server
@defer.inlineCallbacks
def test_a_lookup(self):
@@ -107,9 +107,9 @@ class DNSConsistencyTest(dnst.DNSTest):
control_answers = yield self.performALookup(hostname, self.control_dns_server)
if not control_answers:
- log.err("Got no response from control DNS server %s," \
+ log.err("Got no response from control DNS server %s:%d," \
" perhaps the DNS resolver is down?" % self.control_dns_server[0])
- self.report['tampering'][self.control_dns_server] = 'no_answer'
+ self.report['tampering']["%s:%d" % self.control_dns_server] = 'no_answer'
return
for test_resolver in self.test_resolvers:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits