pidl: Don’t overwrite exception set by PyUnicode_AsEncodedString()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 14 Nov 2023 23:10:36 +0000 (12:10 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 16 Nov 2023 05:18:36 +0000 (05:18 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
pidl/lib/Parse/Pidl/Samba4/Python.pm

index 821cf441a60ff933f83df79c612bbd0958d7e40b..2d1e0610245db00329dd6752157fc3ac8c53628a 100644 (file)
@@ -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("}");