[Python-checkins] python/dist/src/Modules posixmodule.c,2.289,2.290
jvr@users.sourceforge.net
jvr@users.sourceforge.net
2003年3月04日 11:30:49 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv977/Modules
Modified Files:
posixmodule.c
Log Message:
os.listdir(): Fall back to the original byte string if conversion to unicode
fails, as discussed in patch #683592.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.289
retrieving revision 2.290
diff -C2 -d -r2.289 -r2.290
*** posixmodule.c 3 Mar 2003 19:07:13 -0000 2.289
--- posixmodule.c 4 Mar 2003 19:30:44 -0000 2.290
***************
*** 1810,1819 ****
Py_FileSystemDefaultEncoding,
"strict");
! Py_DECREF(v);
! v = w;
! if (v == NULL) {
! Py_DECREF(d);
! d = NULL;
! break;
}
}
--- 1810,1821 ----
Py_FileSystemDefaultEncoding,
"strict");
! if (w != NULL) {
! Py_DECREF(v);
! v = w;
! }
! else {
! /* fall back to the original byte string, as
! discussed in patch #683592 */
! PyErr_Clear();
}
}