[Python-checkins] r80949 - python/branches/py3k/Python/errors.c
victor.stinner
python-checkins at python.org
Sat May 8 02:35:33 CEST 2010
Author: victor.stinner
Date: Sat May 8 02:35:33 2010
New Revision: 80949
Log:
PyErr_SetFromErrnoWithFilename() decodes the filename using
PyUnicode_DecodeFSDefault() instead of PyUnicode_FromString()
Modified:
python/branches/py3k/Python/errors.c
Modified: python/branches/py3k/Python/errors.c
==============================================================================
--- python/branches/py3k/Python/errors.c (original)
+++ python/branches/py3k/Python/errors.c Sat May 8 02:35:33 2010
@@ -446,7 +446,7 @@
PyObject *
PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
{
- PyObject *name = filename ? PyUnicode_FromString(filename) : NULL;
+ PyObject *name = filename ? PyUnicode_DecodeFSDefault(filename) : NULL;
PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name);
Py_XDECREF(name);
return result;
More information about the Python-checkins
mailing list