This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, ezio.melotti
Date 2012-10-16.16:18:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is to fix invocations of URLError so that "reasons" are not passed in for the "filename" argument of the URLError constructor.

Ezio found and described this issue when commenting on issue 10836:

  http://bugs.python.org/issue10836#msg172988

In more detail: URLError accepts "reason" and "filename" arguments:

http://hg.python.org/cpython/file/74b95194ba86/Lib/urllib/error.py#l23

However, in several places in Lib/urllib, URLError is invoked with a "reason" passed in for the filename.  For example:

    raise URLError('local file error', 'not on local host')

This issue could be addressed for this example by changing the above to:

    raise URLError('local file error: not on local host')

This dovetails with issue #16247, which is to start passing the actual filename in for some calls to URLError (and perhaps to adjust URLError's __str__, etc).
History
Date User Action Args
2012-10-16 16:18:13chris.jerdoneksetrecipients: + chris.jerdonek, ezio.melotti
2012-10-16 16:18:13chris.jerdoneksetmessageid: <1350404293.01.0.800497532294.issue16250@psf.upfronthosting.co.za>
2012-10-16 16:18:12chris.jerdoneklinkissue16250 messages
2012-10-16 16:18:12chris.jerdonekcreate