commit a3aad913eccbad3bcd390b3cb73f52f11dddaadc Author: Simone Basso bassosimone@gmail.com Date: Thu Nov 5 14:47:13 2015 +0100
deal with existing, but empty, reporting.yml
Spotted while helping @anadahz to debug lepidopter. --- ooni/reporter.py | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/ooni/reporter.py b/ooni/reporter.py index 36a0e88..b0df393 100644 --- a/ooni/reporter.py +++ b/ooni/reporter.py @@ -395,6 +395,8 @@ class OONIBReportLog(object): def get_report_log(self): with open(self.file_name) as f: report_log = yaml.safe_load(f) + if not report_log: + report_log = {} # consumers expect dictionary structure return report_log
@property
tor-commits@lists.torproject.org