[tor-commits] [oonib/master] Add imports and fix referenced-before-assignment

art at torproject.org art at torproject.org
Wed Sep 11 09:13:52 UTC 2013


commit 06870f856c864deca0f6bb28b5f2bfc0c870940e
Author: aagbsn <aagbsn at extc.org>
Date:   Sat Aug 24 15:00:20 2013 +0200

    Add imports and fix referenced-before-assignment
    
    Adds required imports and fixes a bug where no test-helper is
    requested but requested_helper is referenced without being assigned.
---
 oonib/report/handlers.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/oonib/report/handlers.py b/oonib/report/handlers.py
index 32f653d..fd008dd 100644
--- a/oonib/report/handlers.py
+++ b/oonib/report/handlers.py
@@ -1,4 +1,7 @@
+import json
+import os
 import random
+import re
 import string
 import time
 import yaml
@@ -231,10 +234,11 @@ class NewReportHandlerFile(OONIBHandler):
             'report_id': report_id
         }
         
+
         try:
             requested_helper = report_data['test_helper']
         except KeyError:
-            pass
+            requested_helper = None
 
         if requested_helper:
             try:





More information about the tor-commits mailing list