Marcus Meissner
529de9b9f0
- Update to net-snmp-5.9.4 (bsc#1214364). - Removing legacy MIBs used by Velocity Software (jira#PED-6416). - Re-add support for hostname netgroups that was removed accidentally and previously added with FATE#316305 (bsc#1207697). '@hostgroup' can be specified for multiple hosts - Hardening systemd services setting "ProtectHome=true" caused home directory size and allocation to be listed incorrectly (bsc#1206044). OBS-URL: https://build.opensuse.org/request/show/1118370 OBS-URL: https://build.opensuse.org/package/show/network:utilities/net-snmp?expand=0&rev=59
21 lines
756 B
Diff
21 lines
756 B
Diff
diff -Nurp net-snmp-5.9.3-orig/python/netsnmp/client_intf.c net-snmp-5.9.3/python/netsnmp/client_intf.c
|
|
--- net-snmp-5.9.3-orig/python/netsnmp/client_intf.c 2022-07-13 23:14:14.000000000 +0200
|
|
+++ net-snmp-5.9.3/python/netsnmp/client_intf.c 2022-09-23 16:21:44.040588303 +0200
|
|
@@ -872,9 +872,16 @@ py_netsnmp_attr_string(PyObject *obj, co
|
|
if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) {
|
|
PyObject *attr = PyObject_GetAttrString(obj, attr_name);
|
|
if (attr) {
|
|
+#if PY_MAJOR_VERSION >= 3
|
|
*val = PyUnicode_AsUTF8AndSize(attr, len);
|
|
Py_DECREF(attr);
|
|
return 0;
|
|
+#else
|
|
+ int retval;
|
|
+ retval = PyBytes_AsStringAndSize(attr, val, len);
|
|
+ Py_DECREF(attr);
|
|
+ return retval;
|
|
+#endif
|
|
}
|
|
}
|
|
|