commit d982fedd0c28c75d545b9265c71d3226827bea6c Author: Arturo Filastò art@fuffa.org Date: Fri Mar 28 02:23:52 2014 +0100
Fix parsing of collector key in reports. --- ooni/oonicli.py | 2 +- ooni/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ooni/oonicli.py b/ooni/oonicli.py index 4fed4c7..7ac1e76 100644 --- a/ooni/oonicli.py +++ b/ooni/oonicli.py @@ -232,7 +232,7 @@ def runWithDirector(logging=True, start_tor=True): if not global_options['no-collector']: if global_options['collector']: collector = global_options['collector'] - elif config.reports['collector']: + elif 'collector' in config.reports and config.reports['collector']: collector = config.report['collector'] elif net_test_loader.collector: collector = net_test_loader.collector diff --git a/ooni/settings.py b/ooni/settings.py index 1c4f42d..97e5297 100644 --- a/ooni/settings.py +++ b/ooni/settings.py @@ -95,7 +95,7 @@ class OConfig(object): config_file_contents = '\n'.join(f.readlines()) configuration = yaml.safe_load(config_file_contents)
- for setting in ['basic', 'advanced', 'privacy', 'tor']: + for setting in ['basic', 'reports', 'advanced', 'privacy', 'tor']: try: for k, v in configuration[setting].items(): getattr(self, setting)[k] = v