diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-23 12:12:25 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-23 12:12:25 (GMT) |
commit | f8d7d41507d8c0855b58c9be14011381d03c5cde (patch) | |
tree | 1a38be5e64aaf4c64a7581f209548818926cdb0f /Modules/_datetimemodule.c | |
parent | 8c9331057d0f5c75cd3e73f3f85fe237da0f9ed1 (diff) | |
download | cpython-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.c | 5 |
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; |