pidl: Don’t overwrite exception set by PyUnicode_AsEncodedString()
[vlendec/samba-autobuild/.git] / 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("}");