mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
* bpo-32731: Raise OSError from any failure in getpass.getuser() Previously, if the username was not set in certain environment variables, ImportError escaped on Windows systems, and it was possible for KeyError to escape on other systems if getpwuid() failed.
3 lines
193 B
ReStructuredText
3 lines
193 B
ReStructuredText
:func:`getpass.getuser` now raises :exc:`OSError` for all failures rather
|
|
than :exc:`ImportError` on systems lacking the :mod:`pwd` module or
|
|
:exc:`KeyError` if the password database is empty.
|