summaryrefslogtreecommitdiffstats
path: root/python.d/squid.chart.py
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
commit61aedf201c2c4bf0e5aa4db32e74f4d860b88593 (patch)
treebcf4f9a0cd8bc2daf38b2ff9f29bfcc1e5ed8968 /python.d/squid.chart.py
parentNew upstream version 1.8.0+dfsg (diff)
downloadnetdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.tar.xz
netdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.zip
New upstream version 1.9.0+dfsgupstream/1.9.0+dfsg
Diffstat (limited to 'python.d/squid.chart.py')
-rw-r--r--python.d/squid.chart.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/python.d/squid.chart.py b/python.d/squid.chart.py
index e9e8f1d0..ba8f982f 100644
--- a/python.d/squid.chart.py
+++ b/python.d/squid.chart.py
@@ -2,8 +2,8 @@
# Description: squid netdata python.d module
# Author: Pawel Krupa (paulfantom)
-from base import SocketService
-import select
+from bases.FrameworkServices.SocketService import SocketService
+
# default module values (can be overridden per job in `config`)
# update_every = 2
@@ -60,7 +60,7 @@ class Service(SocketService):
"""
response = self._get_raw_data()
- data = {}
+ data = dict()
try:
raw = ""
for tmp in response.split('\r\n'):
@@ -81,11 +81,10 @@ class Service(SocketService):
self.error("invalid data received")
return None
- if len(data) == 0:
+ if not data:
self.error("no data received")
return None
- else:
- return data
+ return data
def _check_raw_data(self, data):
header = data[:1024].lower()