equal
deleted
inserted
replaced
8 |
8 |
9 import errno, mimetypes, os |
9 import errno, mimetypes, os |
10 |
10 |
11 HTTP_OK = 200 |
11 HTTP_OK = 200 |
12 HTTP_BAD_REQUEST = 400 |
12 HTTP_BAD_REQUEST = 400 |
|
13 HTTP_UNAUTHORIZED = 401 |
13 HTTP_NOT_FOUND = 404 |
14 HTTP_NOT_FOUND = 404 |
|
15 HTTP_METHOD_NOT_ALLOWED = 405 |
14 HTTP_SERVER_ERROR = 500 |
16 HTTP_SERVER_ERROR = 500 |
15 |
17 |
16 class ErrorResponse(Exception): |
18 class ErrorResponse(Exception): |
17 def __init__(self, code, message=None): |
19 def __init__(self, code, message=None): |
18 Exception.__init__(self) |
20 Exception.__init__(self) |