Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python2 compatibility in graphite and statsd output #94

Closed
amyangfei opened this issue Nov 26, 2015 · 0 comments
Closed

python2 compatibility in graphite and statsd output #94

amyangfei opened this issue Nov 26, 2015 · 0 comments

Comments

@amyangfei
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant