mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
posix_getlogin(): Be more cautious about interpreting a NULL from
getlogin() -- it is not clear that a NULL is always an error.
This commit is contained in:
parent
a30680b240
commit
e63544f872
1 changed files with 1 additions and 1 deletions
|
@ -1914,7 +1914,7 @@ posix_getlogin(PyObject *self, PyObject *args)
|
|||
posix_error();
|
||||
else
|
||||
PyErr_SetString(PyExc_OSError,
|
||||
"unexpected NULL from getlogin()");
|
||||
"unable to determine login name");
|
||||
}
|
||||
else
|
||||
result = PyString_FromString(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue