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:
Fred Drake 2000-12-06 21:45:33 +00:00
parent a30680b240
commit e63544f872

View file

@ -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);