From: Garret Heaton Date: Tue, 20 Jul 2010 01:56:31 +0000 (-0700) Subject: Fix incorrect error logging. X-Git-Tag: collectd-5.0.0-beta0~79 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8c697f28b19df736da174a4fa750fb1ca95c56dc;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__':