[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] Add imports and fix referenced-before-assignment
commit 06870f856c864deca0f6bb28b5f2bfc0c870940e
Author: aagbsn <aagbsn@xxxxxxxx>
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:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits