diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2017-12-19 23:39:27 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2017-12-19 23:39:27 +0000 |
commit | 6abdfdead1326ccca98dc4cf415c216f1bf25400 (patch) | |
tree | 70b803bd499fd45e89627c1b45b90ddf20e8e959 /python.d/squid.chart.py | |
parent | Release v. 1.8.0+dfsg-1 to Unstable (diff) | |
parent | New upstream version 1.9.0+dfsg (diff) | |
download | netdata-6abdfdead1326ccca98dc4cf415c216f1bf25400.tar.xz netdata-6abdfdead1326ccca98dc4cf415c216f1bf25400.zip |
Update upstream source from tag 'upstream/1.9.0+dfsg'
Update to upstream version '1.9.0+dfsg'
with Debian dir 28b8242a05f9ad26cd1cdbcf078be754fc7d6251
Diffstat (limited to 'python.d/squid.chart.py')
-rw-r--r-- | python.d/squid.chart.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/python.d/squid.chart.py b/python.d/squid.chart.py index e9e8f1d08..ba8f982ff 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() |