From: Garret Heaton Date: Tue, 20 Jul 2010 01:56:31 +0000 (-0700) Subject: Fix incorrect error logging. X-Git-Tag: collectd-4.10.2~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0fe0b565ea84fb2363411366905c7cfb492cd709;p=collectd.git Fix incorrect error logging. Was calling sys.stderror instead of sys.stderr. --- diff --git a/contrib/collectd_unixsock.py b/contrib/collectd_unixsock.py index c482ac61..ebe040d6 100644 --- a/contrib/collectd_unixsock.py +++ b/contrib/collectd_unixsock.py @@ -172,8 +172,8 @@ class Collectd(): print "[socket] connected to %s" % self.path return sock except socket.error, (errno, errstr): - sys.stderror.write("[error] Connecting to socket failed: [%d] %s" - % (errno, errstr)) + sys.stderr.write("[error] Connecting to socket failed: [%d] %s" + % (errno, errstr)) return None def _readline(self): @@ -193,8 +193,8 @@ class Collectd(): buf.append(data) return ''.join(buf) except socket.error, (errno, errstr): - sys.stderror.write("[error] Reading from socket failed: [%d] %s" - % (errno, errstr)) + sys.stderr.write("[error] Reading from socket failed: [%d] %s" + % (errno, errstr)) self._sock = self._connect() return None @@ -218,8 +218,8 @@ class Collectd(): try: self._sock.close() except socket.error, (errno, errstr): - sys.stderror.write("[error] Closing socket failed: [%d] %s" - % (errno, errstr)) + sys.stderr.write("[error] Closing socket failed: [%d] %s" + % (errno, errstr)) if __name__ == '__main__':