From: Alexander Else Date: Mon, 1 Jul 2013 06:17:12 +0000 (+1000) Subject: decode_network_values dstype is ordinal value of string literal X-Git-Tag: collectd-5.4.0~25^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f23f80cf88cbb97a088dfdcb0e70c668d7e5c7ff;p=collectd.git decode_network_values dstype is ordinal value of string literal --- diff --git a/contrib/collectd_network.py b/contrib/collectd_network.py index 9af0fb00..dc6cdac4 100644 --- a/contrib/collectd_network.py +++ b/contrib/collectd_network.py @@ -76,7 +76,7 @@ def decode_network_values(ptype, plen, buf): assert double.size == number.size result = [] - for dstype in buf[header.size+short.size:off]: + for dstype in [ord(x) for x in buf[header.size+short.size:off]]: if dstype == DS_TYPE_COUNTER: result.append((dstype, number.unpack_from(buf, off)[0])) off += valskip