Show More
@@ -71,13 +71,12 b' permhooks.append(checkauthz)' | |||||
71 |
|
71 | |||
72 | class ErrorResponse(Exception): |
|
72 | class ErrorResponse(Exception): | |
73 | def __init__(self, code, message=None, headers=[]): |
|
73 | def __init__(self, code, message=None, headers=[]): | |
74 | Exception.__init__(self) |
|
74 | if message is None: | |
|
75 | message = _statusmessage(code) | |||
|
76 | Exception.__init__(self, code, message) | |||
75 | self.code = code |
|
77 | self.code = code | |
|
78 | self.message = message | |||
76 | self.headers = headers |
|
79 | self.headers = headers | |
77 | if message is not None: |
|
|||
78 | self.message = message |
|
|||
79 | else: |
|
|||
80 | self.message = _statusmessage(code) |
|
|||
81 |
|
80 | |||
82 | def _statusmessage(code): |
|
81 | def _statusmessage(code): | |
83 | from BaseHTTPServer import BaseHTTPRequestHandler |
|
82 | from BaseHTTPServer import BaseHTTPRequestHandler |
General Comments 0
You need to be logged in to leave comments.
Login now