]> arthur.barton.de Git - netdata.git/commitdiff
Merge pull request #1093 from romain-dartigues/rdartigues
authorPaweł Krupa <paulfantom@gmail.com>
Sun, 9 Oct 2016 20:25:05 +0000 (22:25 +0200)
committerGitHub <noreply@github.com>
Sun, 9 Oct 2016 20:25:05 +0000 (22:25 +0200)
plugin: ignore encoding errors (hddtemp related)

1  2 
python.d/python_modules/base.py

index 1508e0965e58b8ca184400ebbc584b157c0d7c99,44c7dea3afdf3f826b882f844e79b32540e3e408..70c586f8e411a276b829406cddc75cbcf8a4b7cf
@@@ -608,7 -608,7 +608,7 @@@ class SocketService(SimpleService)
                  buf = self._sock.recv(4096)
                  if len(buf) == 0 or buf is None:  # handle server disconnect
                      break
-                 data += buf.decode()
+                 data += buf.decode(errors='ignore')
                  if self._check_raw_data(data):
                      break
              else:
              self.unix_socket = str(self.configuration['socket'])
          except (KeyError, TypeError):
              self.debug("No unix socket specified. Trying TCP/IP socket.")
 +            self.unix_socket = None
              try:
                  self.host = str(self.configuration['host'])
              except (KeyError, TypeError):
          self.request = self.request.encode()
  
      def check(self):
 +        self._parse_config()
          return SimpleService.check(self)