From 8c697f28b19df736da174a4fa750fb1ca95c56dc Mon Sep 17 00:00:00 2001 From: Garret Heaton Date: Mon, 19 Jul 2010 18:56:31 -0700 Subject: [PATCH] Fix incorrect error logging. Was calling sys.stderror instead of sys.stderr. --- contrib/collectd_unixsock.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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__': -- 2.30.2