Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*.

This commit is contained in:
Serhiy Storchaka 2016-10-23 15:12:25 +03:00
parent 8c9331057d
commit f8d7d41507
5 changed files with 20 additions and 37 deletions

View file

@ -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;