summaryrefslogtreecommitdiffstats
path: root/python.d/redis.chart.py
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
committerLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
commita133c9c3b637b1dbe7b5b053f7e2572c1950cead (patch)
tree2207939a88e96bca329457f40a9d9d18ab659dc1 /python.d/redis.chart.py
parentNew upstream version 1.6.0+dfsg (diff)
downloadnetdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.tar.xz
netdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.zip
New upstream version 1.7.0+dfsgupstream/1.7.0+dfsg
Diffstat (limited to 'python.d/redis.chart.py')
-rw-r--r--python.d/redis.chart.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python.d/redis.chart.py b/python.d/redis.chart.py
index 61f4f6d61..4bc1d41f9 100644
--- a/python.d/redis.chart.py
+++ b/python.d/redis.chart.py
@@ -100,13 +100,12 @@ class Service(SocketService):
:return: dict
"""
if self.passwd:
- info_request = self.request
self.request = "AUTH " + self.passwd + "\r\n"
raw = self._get_raw_data().strip()
if raw != "+OK":
self.error("invalid password")
return None
- self.request = info_request
+ self.request = "INFO\r\n"
response = self._get_raw_data()
if response is None:
# error has already been logged
@@ -155,7 +154,7 @@ class Service(SocketService):
:return: boolean
"""
length = len(data)
- supposed = data.split('\n')[0][1:]
+ supposed = data.split('\n')[0][1:-1]
offset = len(supposed) + 4 # 1 dollar sing, 1 new line character + 1 ending sequence '\r\n'
if not supposed.isdigit():
return True