summaryrefslogtreecommitdiffstats
path: root/glances/snmp.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/snmp.py')
-rw-r--r--glances/snmp.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/glances/snmp.py b/glances/snmp.py
index 368efd19..aa123151 100644
--- a/glances/snmp.py
+++ b/glances/snmp.py
@@ -20,7 +20,6 @@ except ImportError:
class GlancesSNMPClient(object):
-
"""SNMP client class (based on pysnmp library)."""
def __init__(self, host='localhost', port=161, version='2c', community='public', user='private', auth=''):
@@ -41,12 +40,9 @@ class GlancesSNMPClient(object):
ret = {}
for name, val in varBinds:
if str(val) == '':
- ret[name.prettyPrint()] = ''
+ ret[str(name)] = ''
else:
- ret[name.prettyPrint()] = val.prettyPrint()
- # In Python 3, prettyPrint() return 'b'linux'' instead of 'linux'
- if ret[name.prettyPrint()].startswith('b\''):
- ret[name.prettyPrint()] = ret[name.prettyPrint()][2:-1]
+ ret[str(name)] = val.prettyPrint()
return ret
def __get_result__(self, errorIndication, errorStatus, errorIndex, varBinds):