commit ab7ac8cc12fcc3b75c08bef5711b6d5a0020786a Author: Arturo Filastò art@fuffa.org Date: Fri Dec 7 10:42:27 2012 +0100
Properly handle empty tor configuration parameters --- ooni/config.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ooni/config.py b/ooni/config.py index ec9865d..7621041 100644 --- a/ooni/config.py +++ b/ooni/config.py @@ -79,8 +79,11 @@ def loadConfigFile():
# Process the tor configuration options tor = Storage() - for k, v in configuration['tor'].items(): - tor[k] = v + try: + for k, v in configuration['tor'].items(): + tor[k] = v + except AttributeError: + pass
return basic, privacy, advanced, tor