[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] remove overbroad try/except
commit eae427c12a5c1ca1ec42c9c10893710eb9ed9d08
Author: Darius Bacon <darius@xxxxxx>
Date: Wed Apr 16 12:21:02 2014 -0700
remove overbroad try/except
---
oonib/report/handlers.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/oonib/report/handlers.py b/oonib/report/handlers.py
index 9e9e8ca..f1fec4a 100644
--- a/oonib/report/handlers.py
+++ b/oonib/report/handlers.py
@@ -250,10 +250,7 @@ class NewReportHandlerFile(OONIBHandler, UpdateReportMixin):
software_version = str(report_data['software_version'])
probe_asn = str(report_data['probe_asn'])
- try:
- probe_cc = str(report_data['probe_cc'])
- except:
- probe_cc = 'ZZ'
+ probe_cc = str(report_data.get('probe_cc', 'ZZ'))
self.testName = str(report_data['test_name'])
self.testVersion = str(report_data['test_version'])
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits