relocate packages on recipes-base/recipes-enigma2/recipes-wlan.
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-devtools / python / python / ctypes-error-handling-fix.patch
diff --git a/meta-openvuplus/recipes-devtools/python/python/ctypes-error-handling-fix.patch b/meta-openvuplus/recipes-devtools/python/python/ctypes-error-handling-fix.patch
new file mode 100644 (file)
index 0000000..5e07082
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/Modules/_ctypes/_ctypes.c        2012-01-26 15:41:30.000000000 +0100
++++ b/Modules/_ctypes/_ctypes.c        2012-01-26 15:44:41.046977137 +0100
+@@ -602,10 +602,16 @@
+ #ifdef __CYGWIN__
+ /* dlerror() isn't very helpful on cygwin */
+         PyErr_Format(PyExc_ValueError,
+-                     "symbol '%s' not found (%s) ",
++                     "symbol '%s' not found",
+                      name);
+ #else
+-        PyErr_SetString(PyExc_ValueError, ctypes_dlerror());
++        const char *err = ctypes_dlerror();
++        if (!err)
++            PyErr_Format(PyExc_ValueError,
++                         "symbol '%s' not found",
++                         name);
++        else
++            PyErr_SetString(PyExc_ValueError, err);
+ #endif
+         return NULL;
+     }
+@@ -3290,10 +3296,16 @@
+ #ifdef __CYGWIN__
+ /* dlerror() isn't very helpful on cygwin */
+         PyErr_Format(PyExc_AttributeError,
+-                     "function '%s' not found (%s) ",
++                     "function '%s' not found",
+                      name);
+ #else
+-        PyErr_SetString(PyExc_AttributeError, ctypes_dlerror());
++        const char *err = ctypes_dlerror();
++        if (!err)
++            PyErr_Format(PyExc_AttributeError,
++                         "function '%s' not found",
++                         name);
++        else
++            PyErr_SetString(PyExc_AttributeError, err);
+ #endif
+         return NULL;
+     }