Kaydet (Commit) 99bb5f3f authored tarafından Georg Brandl's avatar Georg Brandl

#2585: initialize code attribute of HTTPError.

üst 8f80a6a5
......@@ -159,7 +159,7 @@ class HTTPError(URLError, addinfourl):
# file object. If this happens, the simplest workaround is to
# not initialize the base classes.
if fp is not None:
self.__super_init(fp, hdrs, url)
self.__super_init(fp, hdrs, url, code)
def __str__(self):
return 'HTTP Error %s: %s' % (self.code, self.msg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment