[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] Fix error handling in report update
commit 8f3b5fd74bbe89602312e917d3a616b78ed544b5
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Sat Jan 24 15:15:27 2015 +0100
Fix error handling in report update
---
oonib/errors.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/oonib/errors.py b/oonib/errors.py
index c5829d2..64b179f 100644
--- a/oonib/errors.py
+++ b/oonib/errors.py
@@ -2,11 +2,9 @@ from cyclone.web import HTTPError
class OONIBError(HTTPError):
- status_code = 500
- log_message = 'oonib-error'
-
- def __init__(self):
- pass
+ def __init__(self, status_code=500, log_message='oonib-error'):
+ self.status_code = status_code
+ self.log_message = log_message
class InvalidRequest(OONIBError):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits