1. python_mirrors
  2. sandbox/nvawda

Commits

Jason R. Coombs  committed a3ddee9

Pass positional arguments - HTTPError is not accepting keyword arguments. Reference #13211 and #12555.

  • Participants
  • Parent commits f094776
  • Branches default

Comments (0)

Files changed (1)

File Lib/test/test_urllib2.py

View file
     Issue 13211 reveals that HTTPError didn't implement the URLError
     interface even though HTTPError is a subclass of URLError.
 
-    >>> err = urllib.error.HTTPError(msg='something bad happened', url=None, code=None, hdrs=None, fp=None)
+    >>> msg = 'something bad happened'
+    >>> url = code = hdrs = fp = None
+    >>> err = urllib.error.HTTPError(msg, url, code, hdrs, fp)
     >>> assert hasattr(err, 'reason')
     >>> err.reason
     'something bad happened'