summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-05 14:04:19 -0800
committerSerhiy Storchaka <storchaka@gmail.com>2018-12-06 00:04:19 +0200
commit3a9b3346b03796d8573c063ab4c2407043609459 (patch)
tree4cff7959c2a580eef2057e305e41b823c5b2010f /Modules
parentfdf505000f135df3bdae08697b2a324d8f046768 (diff)
downloadcpython-git-3a9b3346b03796d8573c063ab4c2407043609459.tar.gz
bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947) (GH-10954)
(cherry picked from commit 34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b) (cherry picked from commit ac8b47c8b4edd59aaee857717d434df52ec49e6c) Co-authored-by: William Grzybowski <wg@FreeBSD.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/grpmodule.c2
-rw-r--r--Modules/pwdmodule.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c
index 43e45ef7aa..8a724b6b43 100644
--- a/Modules/grpmodule.c
+++ b/Modules/grpmodule.c
@@ -156,7 +156,7 @@ grp_getgrnam_impl(PyObject *module, PyObject *name)
goto out;
if ((p = getgrnam(name_chars)) == NULL) {
- PyErr_Format(PyExc_KeyError, "getgrnam(): name not found: %S", name);
+ PyErr_Format(PyExc_KeyError, "getgrnam(): name not found: %R", name);
goto out;
}
retval = mkgrent(p);
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index 21c2b546f6..810427a229 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -163,7 +163,7 @@ pwd_getpwnam_impl(PyObject *module, PyObject *arg)
goto out;
if ((p = getpwnam(name)) == NULL) {
PyErr_Format(PyExc_KeyError,
- "getpwnam(): name not found: %S", arg);
+ "getpwnam(): name not found: %R", arg);
goto out;
}
retval = mkpwent(p);