diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-03-19 11:44:17 +0200 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-03-19 11:44:17 +0200 |
commit | e760fe305dec8952fa632cd0edb1cb2e439ec0f4 (patch) | |
tree | 09b0644b18a74169825264ce90941de3ea749146 /Doc | |
parent | 83d2dab65109faad4b5e461d97db50de7c9c9316 (diff) | |
download | cpython-e760fe305dec8952fa632cd0edb1cb2e439ec0f4.tar.gz |
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 58be78f017..53f8c09e09 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 1129cb3434..904605861b 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 -------------------- |