summaryrefslogtreecommitdiff
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-08-28 19:33:26 +0100
committerRichard Oudkerk <shibturn@gmail.com>2012-08-28 19:33:26 +0100
commit30147710e8d6b2b5aebcf6f774fe289a4918958c (patch)
treeaa70457708b93bd0dbe12b1e6d8a17582d12ed71 /Objects/exceptions.c
parentca2b64682e2f3c5e3fb2ed150600a73105119e82 (diff)
downloadcpython-git-30147710e8d6b2b5aebcf6f774fe289a4918958c.tar.gz
Issue #15784: Modify OSError.__str__() to better distinguish between
errno error numbers and Windows error numbers.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 74bb26285e..6b04700621 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1016,12 +1016,12 @@ OSError_str(PyOSErrorObject *self)
#ifdef MS_WINDOWS
/* If available, winerror has the priority over myerrno */
if (self->winerror && self->filename)
- return PyUnicode_FromFormat("[Error %S] %S: %R",
+ return PyUnicode_FromFormat("[WinError %S] %S: %R",
self->winerror ? self->winerror: Py_None,
self->strerror ? self->strerror: Py_None,
self->filename);
if (self->winerror && self->strerror)
- return PyUnicode_FromFormat("[Error %S] %S",
+ return PyUnicode_FromFormat("[WinError %S] %S",
self->winerror ? self->winerror: Py_None,
self->strerror ? self->strerror: Py_None);
#endif