Skip to content
Browse files

Clean up.

  • Loading branch information...
1 parent 8a6fb6c commit 8a212b18b4957a802f87c146bd05b0a372da492b James Socol committed Apr 10, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −3 statsd/client.py
  2. +0 −1 statsd/tests.py
View
6 statsd/client.py
@@ -38,7 +38,7 @@ def __init__(self, host='localhost', port=8125, prefix=None):
# Use getaddrinfo to support IPv4/6.
self._addr = socket.getaddrinfo(host, port)[0][4]
self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- self.prefix = prefix
+ self._prefix = prefix
def timer(self, stat, rate=1):
return _Timer(self, stat, rate)
@@ -67,8 +67,8 @@ def _send(self, stat, value, rate=1):
else:
return
- if self.prefix:
- stat = '%s.%s' % (self.prefix, stat)
+ if self._prefix:
+ stat = '%s.%s' % (self._prefix, stat)
try:
self._sock.sendto('%s:%s' % (stat, value), self._addr)
View
1 statsd/tests.py
@@ -12,7 +12,6 @@
ADDR = socket.getaddrinfo(*IN_ADDR)[0][4]
-
def _client(prefix=None):
sc = StatsClient(host=ADDR[0], port=ADDR[1], prefix=prefix)
sc._sock = mock.Mock()

0 comments on commit 8a212b1

Please sign in to comment.
Something went wrong with that request. Please try again.