Skip to content

Commit

Permalink
Fix calling python2 str.split
Browse files Browse the repository at this point in the history
  • Loading branch information
yehzhang committed Jun 18, 2016
1 parent 31bc0aa commit 277fb29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphite_beacon/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def configure(self, **options):
self.default_nan_value = options.get(
'default_nan_value', self.reactor.options['default_nan_value'])
self.ignore_nan = options.get('ignore_nan', self.reactor.options['ignore_nan'])
method_tokens = self.method.split(maxsplit=1)
method_tokens = self.method.split(' ', 1)
assert method_tokens[0] in METHODS, "Method is invalid"
if method_tokens[0] == 'percentile':
try:
Expand Down Expand Up @@ -301,7 +301,7 @@ def _graphite_url(self, query, raw_data=False, graphite_url=None):
return url

def _get_record_attr(self, record):
method_tokens = self.method.split()
method_tokens = self.method.split(' ', 1)
if method_tokens[0] == 'percentile':
return record.percentile(float(method_tokens[1]))
else:
Expand Down

0 comments on commit 277fb29

Please sign in to comment.