cpython: Pass positional arguments - HTTPError is not accepting keyword arguments.

http://hg.python.org/cpython/rev/a3ddee916808 changeset: 73847:a3ddee916808 user: Jason R. Coombs <jaraco@jaraco.com> date: Sat Dec 03 23:18:11 2011 -0500 summary: Pass positional arguments - HTTPError is not accepting keyword arguments. Reference #13211 and #12555. files: Lib/test/test_urllib2.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1454,7 +1454,9 @@ 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' -- Repository URL: http://hg.python.org/cpython
participants (1)
-
jason.coombs