summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-08-28 18:33:26 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2012-08-28 18:33:26 (GMT)
commitea62bd50a37beb6346a6819c54ffd1ae1e70545f (patch)
treefe63f7a3059e6f15ca92abc93c7876595829bbef /Objects
parent5b9eccb383c21fda80f3e3b5b9d6bb803b7b70bf (diff)
downloadcpython-ea62bd50a37beb6346a6819c54ffd1ae1e70545f.zip
cpython-ea62bd50a37beb6346a6819c54ffd1ae1e70545f.tar.gz
cpython-ea62bd50a37beb6346a6819c54ffd1ae1e70545f.tar.bz2
Issue #15784: Modify OSError.__str__() to better distinguish between
errno error numbers and Windows error numbers.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/exceptions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 74bb262..6b04700 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