Method
__init__
(self, code, header="", content="")
Source from the content-addressed store, hash-verified
| 54 | |
| 55 | class BadHeader(Exception): |
| 56 | def __init__(self, code, header="", content=""): |
| 57 | int_code = int(code) |
| 58 | Exception.__init__(self, "Bad server response: %s %s" % |
| 59 | (code, responses.get(int_code, unofficial_responses.get(int_code, "unknown error code")))) |
| 60 | self.code = int_code |
| 61 | self.header = header |
| 62 | self.content = content |
| 63 | |
| 64 | |
| 65 | class HTTPRequest(): |
Callers
nothing calls this directly
Tested by
no test coverage detected