summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-16 17:28:50 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-16 17:28:50 (GMT)
commitd8b690f7ae57169d95f1cb4b3a0bccf5adfe6a30 (patch)
tree7399049dc820af415adf247fffd25bbc2ee2aebc /Python/getargs.c
parentbf82e374ee737992235cbe944c9ddbd58236a892 (diff)
downloadcpython-d8b690f7ae57169d95f1cb4b3a0bccf5adfe6a30.zip
cpython-d8b690f7ae57169d95f1cb4b3a0bccf5adfe6a30.tar.gz
cpython-d8b690f7ae57169d95f1cb4b3a0bccf5adfe6a30.tar.bz2
#2895: don't crash with bytes as keyword argument names.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 427a951..7ca7672 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1532,7 +1532,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
while (PyDict_Next(keywords, &pos, &key, &value)) {
int match = 0;
char *ks;
- if (!PyString_Check(key) && !PyUnicode_Check(key)) {
+ if (!PyUnicode_Check(key)) {
PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
return cleanreturn(0, freelist);