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 <>
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:

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

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).
Date User Action Args
2012-10-16 16:18:13chris.jerdoneksetrecipients: + chris.jerdonek, ezio.melotti
2012-10-16 16:18:13chris.jerdoneksetmessageid: <>
2012-10-16 16:18:12chris.jerdoneklinkissue16250 messages
2012-10-16 16:18:12chris.jerdonekcreate