shithub: aubio

Download patch

ref: 2ee90df63c496f3ba748dd020156dad853f38ba1
parent: a138975bd09a621619506c28f359036035c323d6
author: Paul Brossier <[email protected]>
date: Wed May 11 11:26:53 EDT 2016

python/lib/gen_code.py: fix error string

--- a/python/lib/gen_code.py
+++ b/python/lib/gen_code.py
@@ -299,11 +299,7 @@
         out += """
   // return -1 and set error string on failure
   if (self->o == NULL) {{
-    //char_t errstr[30 + strlen(self->uri)];
-    //sprintf(errstr, "error creating {shortname} with params {paramchars}", {paramvals});
-    char_t errstr[60];
-    sprintf(errstr, "error creating {shortname} with given params");
-    PyErr_SetString (PyExc_Exception, errstr);
+    PyErr_Format (PyExc_Exception, "failed creating {shortname}");
     return -1;
   }}
 """.format(paramchars = paramchars, paramvals = paramvals, **self.__dict__)