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.

classification
Title: str(WindowsError) wrong
Type: Stage:
Components: None Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: theller Nosy List: loewis, theller, zseil
Priority: normal Keywords:

Created on 2006-10-12 20:12 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
exceptions.patch theller, 2006-10-13 18:17
Messages (7)
msg30222 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-10-12 20:12
str(WindowsError(1001, 'a message') in Python 2.5 gives
'[Error 22] a message'.

The attached patch with test fixes this.
msg30223 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-10-12 20:13
Logged In: YES 
user_id=11105

See also:
http://mail.python.org/pipermail/python-dev/2006-September/068869.html
msg30224 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-10-12 21:53
Logged In: YES 
user_id=1326842

The part of the patch that changes EnvironmentError_str
should be removed (EnvironmentError doesn't have a winerror
member, the change causes compilation errors).  Otherwise
the patch looks fine.
msg30225 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-10-13 18:17
Logged In: YES 
user_id=11105

My bad.  I didn't test on Linux.
msg30226 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-10-13 18:17
Logged In: YES 
user_id=11105

Uploaded a new patch which I actually tested under Linux also.
msg30227 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-10-21 09:53
Logged In: YES 
user_id=21627

The patch is fine, please apply (along with a NEWS entry,
for both 2.5 and the trunk).
msg30228 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-10-27 19:17
Logged In: YES 
user_id=11105

Committed as rev 52485 (trunk) and 52486 (release25-maint).
History
Date User Action Args
2022-04-11 14:56:20adminsetgithub: 44120
2006-10-12 20:12:25thellercreate