From: Joseph Sutton Date: Tue, 14 Nov 2023 23:10:36 +0000 (+1300) Subject: pidl: Don’t overwrite exception set by PyUnicode_AsEncodedString() X-Git-Tag: talloc-2.4.2~657 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a9ad610226dfbdb5e645e6fe98fd266a960e2d1;p=thirdparty%2Fsamba.git pidl: Don’t overwrite exception set by PyUnicode_AsEncodedString() Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 821cf441a60..2d1e0610245 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1667,7 +1667,6 @@ sub ConvertStringFromPythonData($$$$$) $self->pidl("unicode = PyUnicode_AsEncodedString($py_var, \"utf-8\", \"ignore\");"); $self->pidl("if (unicode == NULL) {"); $self->indent; - $self->pidl("PyErr_NoMemory();"); $self->pidl("$fail"); $self->deindent; $self->pidl("}");