diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-03-19 09:44:17 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-03-19 09:44:17 (GMT) |
commit | 3c3d7f4b99b1f62567592ef57216e07677f17d7f (patch) | |
tree | 8965a590a381f1f7a933edc306f5bd90968f2c91 /Doc | |
parent | af4a1f20bafe5bb38215d8b2cb1470bdf8fe4625 (diff) | |
download | cpython-3c3d7f4b99b1f62567592ef57216e07677f17d7f.zip cpython-3c3d7f4b99b1f62567592ef57216e07677f17d7f.tar.gz cpython-3c3d7f4b99b1f62567592ef57216e07677f17d7f.tar.bz2 |
Issue #18787: spwd.getspnam() now raises a PermissionError if the user
doesn't have privileges.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/spwd.rst | 3 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/spwd.rst b/Doc/library/spwd.rst index 58be78f..53f8c09 100644 --- a/Doc/library/spwd.rst +++ b/Doc/library/spwd.rst @@ -54,6 +54,9 @@ The following functions are defined: Return the shadow password database entry for the given user name. + .. versionchanged:: 3.6 + Raises a :exc:`PermissionError` instead of :exc:`KeyError` if the user + doesn't have privileges. .. function:: getspall() diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 1129cb3..9046058 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -471,6 +471,8 @@ Changes in the Python API the exception will stop a single-threaded server. (Contributed by Martin Panter in :issue:`23430`.) +* :func:`spwd.getspnam` now raises a :exc:`PermissionError` instead of + :exc:`KeyError` if the user doesn't have privileges. Changes in the C API -------------------- |