etsy / logster

Parse log files, generate metrics for Graphite and Ganglia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python2 compatibility in graphite and statsd output

amyangfei opened this issue · comments

hi, this commit b172276 breaks the compatibility for python2

if (not self.dry_run):
    s.sendall(bytes("%s\n" % metric_string, 'ascii'))
else:
    print("%s %s" % (self.graphite_host, metric_string))            
>>> bytes('foo', 'ascii')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: str() takes at most 1 argument (2 given)