STINNER Victor added the comment: According to the manual page, there is no guarantee that missing user and error give a different result. Extracts of the manual page.
""" Return Value The getpwnam() and getpwuid() functions return a pointer to a passwd structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set appropriately. If one wants to check errno after the call, it should be set to zero before the call. (...) Errors 0 or ENOENT or ESRCH or EBADF or EPERM or ... The given name or uid was not found. """ errno=0 is not always the case for mising user. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4261> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com