Code

Fix incorrect error logging.
authorGarret Heaton <powdahound@gmail.com>
Tue, 20 Jul 2010 01:56:31 +0000 (18:56 -0700)
committerGarret Heaton <powdahound@gmail.com>
Tue, 20 Jul 2010 01:56:31 +0000 (18:56 -0700)
Was calling sys.stderror instead of sys.stderr.

contrib/collectd_unixsock.py

index c482ac6185fee8a1988e65271d24b40397c659b7..ebe040d6a11846ab77fe446112668e29354f904f 100644 (file)
@@ -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__':