summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2014-05-07 09:48:32 +0200
committerUltrabug <ultrabug@gentoo.org>2014-05-07 09:48:32 +0200
commit26f0294c88adfa4f42baecea97b4ffc40c393ec4 (patch)
treed9235e72586549b3f6b78b74c781496f5febb9b9
parent6a22aec261747b00488b3e4ba3ffabd43039d59d (diff)
fix netdata module to work with python3 wrt issue #31
-rw-r--r--modules/netdata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/netdata.py b/modules/netdata.py
index d923036..729983b 100644
--- a/modules/netdata.py
+++ b/modules/netdata.py
@@ -64,7 +64,7 @@ class GetData:
'eth0') and grab received/transmitted bytes.
"""
- net_data = self.execCMD('cat', '/proc/net/dev').split()
+ net_data = self.execCMD('cat', '/proc/net/dev').decode('utf-8').split()
interface_index = net_data.index(self.net_interface + ':')
received_bytes = int(net_data[interface_index + 1])
transmitted_bytes = int(net_data[interface_index + 9])