MCPcopy Index your code
hub / github.com/python/cpython / URLError

Class URLError

Lib/urllib/error.py:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class URLError(OSError):
20 # URLError is a sub-type of OSError, but it doesn't share any of
21 # the implementation. It overrides __init__ and __str__.
22 # It sets self.args for compatibility with other OSError
23 # subclasses, but args doesn't have the typical format with errno in
24 # slot 0 and strerror in slot 1. This may be better than nothing.
25 def __init__(self, reason, filename=None):
26 self.args = reason,
27 self.reason = reason
28 if filename is not None:
29 self.filename = filename
30
31 def __str__(self):
32 return '<urlopen error %s>' % self.reason
33
34
35class HTTPError(URLError, urllib.response.addinfourl):

Callers 8

get_authorizationMethod · 0.90
do_request_Method · 0.90
do_openMethod · 0.90
unknown_openMethod · 0.90
open_local_fileMethod · 0.90
ftp_openMethod · 0.90
url2pathnameFunction · 0.90
retrfileMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…