Lines Matching refs:error
24 import urllib.error
39 for module in 'request', 'response', 'parse', 'error', 'robotparser':
83 err = urllib.error.URLError('reason')
280 def error(self, proto, *args):
421 elif action.startswith("error"):
428 return self.parent.error("http", args[0], res, code, "", {})
430 raise urllib.error.URLError("blah")
508 return self.parent.error(
577 from urllib.error import URLError
643 self.assertRaises(urllib.error.URLError, o.open, req)
651 [("http_open", "error 302")],
844 self.assertRaises(urllib.error.URLError,
868 except urllib.error.URLError:
907 self.assertRaises(urllib.error.URLError, h.do_open, http, req)
1145 self.assertFalse(hasattr(o, "proto")) # o.error not called
1149 self.assertFalse(hasattr(o, "proto")) # o.error not called
1153 self.assertFalse(hasattr(o, "proto")) # o.error not called
1154 # anything else calls o.error (and MockOpener returns None, here)
1157 self.assertEqual(o.proto, "http") # o.error called
1196 except urllib.error.HTTPError:
1235 except urllib.error.HTTPError:
1247 except urllib.error.HTTPError:
1263 self.assertRaises(urllib.error.HTTPError, h.http_error_302,
1658 # handle the HTTP auth error
1818 err = urllib.error.HTTPError(url, code, msg, hdrs, fp)
1829 x = urllib.error.HTTPError("url", 405, "METHOD NOT ALLOWED", None, None)