Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name
using the filesystem encoding and surrogateescape error handler. Patch written by David Watson.
This commit is contained in:
parent
0b5669c0f5
commit
5fe6de8c72
|
@ -83,6 +83,10 @@ Extensions
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name
|
||||
using the filesystem encoding and surrogateescape error handler. Patch
|
||||
written by David Watson.
|
||||
|
||||
- Issue #8688: MANIFEST files created by distutils now include a magic
|
||||
comment indicating they are generated. Manually maintained MANIFESTs
|
||||
without this marker will not be overwritten or removed.
|
||||
|
|
|
@ -1849,7 +1849,7 @@ posix_ttyname(PyObject *self, PyObject *args)
|
|||
#endif
|
||||
if (ret == NULL)
|
||||
return posix_error();
|
||||
return PyUnicode_FromString(ret);
|
||||
return PyUnicode_DecodeFSDefault(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1871,7 +1871,7 @@ posix_ctermid(PyObject *self, PyObject *noargs)
|
|||
#endif
|
||||
if (ret == NULL)
|
||||
return posix_error();
|
||||
return PyUnicode_FromString(buffer);
|
||||
return PyUnicode_DecodeFSDefault(buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue