From f23f80cf88cbb97a088dfdcb0e70c668d7e5c7ff Mon Sep 17 00:00:00 2001 From: Alexander Else Date: Mon, 1 Jul 2013 16:17:12 +1000 Subject: [PATCH] decode_network_values dstype is ordinal value of string literal --- contrib/collectd_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.0