From 883c3d8d646135c182db3c6f4085edb052929bcf Mon Sep 17 00:00:00 2001 From: Noel Power Date: Fri, 18 May 2018 17:15:44 +0100 Subject: [PATCH] s4/librpc/ndr: allow GUID to accept unicode also This needed since _GUID_string method change (in source4/torture/drs/python/drs_base.py) which makes use use a unicode guid at times now Signed-off-by: Noel Power Reviewed-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- source4/librpc/ndr/py_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/librpc/ndr/py_misc.c b/source4/librpc/ndr/py_misc.c index 849a11460a4..6c0b8b2af14 100644 --- a/source4/librpc/ndr/py_misc.c +++ b/source4/librpc/ndr/py_misc.c @@ -97,7 +97,7 @@ static int py_GUID_init(PyObject *self, PyObject *args, PyObject *kwargs) DATA_BLOB guid_val; Py_ssize_t _size; - if (!IsPy3BytesOrString(str)) { + if (!IsPy3BytesOrString(str) && !PyUnicode_Check(str)) { PyErr_SetString(PyExc_TypeError, "Expected a string or bytes argument to GUID()"); return -1; } -- 2.34.1