summaryrefslogtreecommitdiffstats
path: root/Modules/_datetimemodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-23 12:12:25 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-23 12:12:25 (GMT)
commitf8d7d41507d8c0855b58c9be14011381d03c5cde (patch)
tree1a38be5e64aaf4c64a7581f209548818926cdb0f /Modules/_datetimemodule.c
parent8c9331057d0f5c75cd3e73f3f85fe237da0f9ed1 (diff)
downloadcpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.zip
cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.tar.gz
cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.tar.bz2
Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r--Modules/_datetimemodule.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 5ddf650..cced71c 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -3243,9 +3243,8 @@ timezone_new(PyTypeObject *type, PyObject *args, PyObject *kw)
{
PyObject *offset;
PyObject *name = NULL;
- if (PyArg_ParseTupleAndKeywords(args, kw, "O!|O!:timezone", timezone_kws,
- &PyDateTime_DeltaType, &offset,
- &PyUnicode_Type, &name))
+ if (PyArg_ParseTupleAndKeywords(args, kw, "O!|U:timezone", timezone_kws,
+ &PyDateTime_DeltaType, &offset, &name))
return new_timezone(offset, name);
return NULL;