File tree Expand file tree Collapse file tree
redis-gmond/python_modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def metric_handler(name):
1212 s = socket .socket (socket .AF_INET , socket .SOCK_STREAM )
1313 s .connect ((metric_handler .host , metric_handler .port ))
1414 if metric_handler .auth is not None :
15- s .send ("*2\r \n $4\r \n AUTH\r \n $%d\r \n %s\r \n " % (len (metric_handler .auth ), metric_handler .auth ));
15+ s .send ("*2\r \n $4\r \n AUTH\r \n $%d\r \n %s\r \n " % (len (metric_handler .auth ), metric_handler .auth ))
1616 result = s .recv (100 )
1717 if not 'OK' in result :
1818 return 0
@@ -22,9 +22,9 @@ def metric_handler(name):
2222 #logging.debug("rcvd INFO")
2323 if "$" != info [0 ]:
2424 return 0
25- len = int (info [1 :info .find ("\n " )])
26- if 4096 < len :
27- info += s .recv (len - 4096 )
25+ msglen = int (info [1 :info .find ("\n " )])
26+ if 4096 < msglen :
27+ info += s .recv (msglen - 4096 )
2828 metric_handler .info = {}
2929 try :
3030 for line in info .splitlines ()[1 :]:
You can’t perform that action at this time.
0 commit comments