summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-devtools/python
diff options
context:
space:
mode:
authornkskjames <nkskjames@gmail.com>2015-11-20 08:58:44 -0600
committernkskjames <nkskjames@gmail.com>2015-11-20 08:58:44 -0600
commit9ac3caea88ef751148ffa9be5c659b220c85112a (patch)
tree2f9d59470a6cb44b836668d417098a67c2be4e24 /meta-phosphor/common/recipes-devtools/python
parent90d4cba2467e9f0a5ffb2a99c3c9783dc3954e30 (diff)
parent3579dc63b8ab8e12fe6078937449f48ab3b9d66c (diff)
downloadtalos-openbmc-9ac3caea88ef751148ffa9be5c659b220c85112a.tar.gz
talos-openbmc-9ac3caea88ef751148ffa9be5c659b220c85112a.zip
Merge pull request #85 from bradbishop/dbus
python-dbus dbus.Byte.__str__ produces broken utf8
Diffstat (limited to 'meta-phosphor/common/recipes-devtools/python')
-rw-r--r--meta-phosphor/common/recipes-devtools/python/python-dbus/bytes.patch37
-rw-r--r--meta-phosphor/common/recipes-devtools/python/python-dbus_1.2.0.bbappend2
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-devtools/python/python-dbus/bytes.patch b/meta-phosphor/common/recipes-devtools/python/python-dbus/bytes.patch
new file mode 100644
index 000000000..d8a10a063
--- /dev/null
+++ b/meta-phosphor/common/recipes-devtools/python/python-dbus/bytes.patch
@@ -0,0 +1,37 @@
+Index: dbus-python-1.2.0/_dbus_bindings/bytes.c
+===================================================================
+--- dbus-python-1.2.0.orig/_dbus_bindings/bytes.c
++++ dbus-python-1.2.0/_dbus_bindings/bytes.c
+@@ -138,23 +138,6 @@ bad_range:
+ return NULL;
+ }
+
+-static PyObject *
+-Byte_tp_str(PyObject *self)
+-{
+- long i = NATIVEINT_ASLONG(self);
+- unsigned char str[2] = { 0, 0 };
+-
+- if (i == -1 && PyErr_Occurred())
+- return NULL;
+- if (i < 0 || i > 255) {
+- PyErr_SetString(PyExc_RuntimeError, "Integer outside range 0-255");
+- return NULL;
+- }
+-
+- str[0] = (unsigned char)i;
+- return PyUnicode_FromStringAndSize((char *)str, 1);
+-}
+-
+ PyTypeObject DBusPyByte_Type = {
+ PyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&PyType_Type), 0)
+ "dbus.Byte",
+@@ -171,7 +154,7 @@ PyTypeObject DBusPyByte_Type = {
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+- Byte_tp_str, /* tp_str */
++ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
diff --git a/meta-phosphor/common/recipes-devtools/python/python-dbus_1.2.0.bbappend b/meta-phosphor/common/recipes-devtools/python/python-dbus_1.2.0.bbappend
new file mode 100644
index 000000000..57d5ef46e
--- /dev/null
+++ b/meta-phosphor/common/recipes-devtools/python/python-dbus_1.2.0.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://bytes.patch"
OpenPOWER on IntegriCloud