mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Merged revisions 84060 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84060 | victor.stinner | 2010-08-15 11:12:51 +0200 (dim., 15 août 2010) | 4 lines 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
eb603e0de1
commit
bae0e623f9
2 changed files with 6 additions and 2 deletions
|
|
@ -1769,7 +1769,7 @@ posix_ttyname(PyObject *self, PyObject *args)
|
|||
#endif
|
||||
if (ret == NULL)
|
||||
return posix_error();
|
||||
return PyUnicode_FromString(ret);
|
||||
return PyUnicode_DecodeFSDefault(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -1791,7 +1791,7 @@ posix_ctermid(PyObject *self, PyObject *noargs)
|
|||
#endif
|
||||
if (ret == NULL)
|
||||
return posix_error();
|
||||
return PyUnicode_FromString(buffer);
|
||||
return PyUnicode_DecodeFSDefault(buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue