commit 40146616bcca5404b1812afc581319b9ec3fa75a Author: aagbsn aagbsn@extc.org Date: Fri Nov 22 12:30:28 2013 +0000
Revert "Fix report header in order to fix issue https://github.com/TheTorProject/ooni-probe/issues/223"
This reverts commit 72728414754c6df8defc133992788ba43af53615.
Reason: Breaks report header parsing in ooni-backend --- ooni/deck.py | 5 +---- ooni/nettest.py | 5 ++--- ooni/oonicli.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/ooni/deck.py b/ooni/deck.py index 9054f25..7b8a8c4 100644 --- a/ooni/deck.py +++ b/ooni/deck.py @@ -108,9 +108,6 @@ class Deck(InputFile): self.deckHash = sha256(f.read()) f.seek(0) test_deck = yaml.safe_load(f) - - if isinstance(test_deck, dict): - test_deck = [test_deck]
for test in test_deck: try: @@ -120,7 +117,7 @@ class Deck(InputFile): log.msg("Skipping...") continue net_test_loader = NetTestLoader(test['options']['subargs'], - test_file=nettest_path, global_options=test['options']) + test_file=nettest_path) #XXX: If the deck specifies the collector, we use the specified collector # And it should also specify the test helper address to use # net_test_loader.collector = test['options']['collector'] diff --git a/ooni/nettest.py b/ooni/nettest.py index f4ce3be..9304f2b 100644 --- a/ooni/nettest.py +++ b/ooni/nettest.py @@ -174,10 +174,9 @@ class NetTestLoader(object): method_prefix = 'test' collector = None
- def __init__(self, options, test_file=None, test_string=None, global_options={}): + def __init__(self, options, test_file=None, test_string=None): self.onionInputRegex = re.compile("(httpo://[a-z0-9]{16}.onion)/input/([a-z0-9]{64})$") self.options = options - self.globalOptions = global_options self.testCases, test_cases = None, None
if test_file: @@ -288,7 +287,7 @@ class NetTestLoader(object): 'test_version': self.testVersion, 'software_name': 'ooniprobe', 'software_version': software_version, - 'options': self.globalOptions, + 'options': self.options, 'input_hashes': input_file_hashes } return test_details diff --git a/ooni/oonicli.py b/ooni/oonicli.py index a19c4ef..8622e09 100644 --- a/ooni/oonicli.py +++ b/ooni/oonicli.py @@ -143,7 +143,7 @@ def runWithDirector(): log.debug("No test deck detected") test_file = nettest_to_path(global_options['test_file']) net_test_loader = NetTestLoader(global_options['subargs'], - test_file=test_file, global_options=global_options) + test_file=test_file) deck.insert(net_test_loader) except errors.MissingRequiredOption, option_name: log.err('Missing required option: "%s"' % option_name)
tor-commits@lists.torproject.org