Merge pull request #5064 from hulu/range-shadowing

rename to avoid shadowing 'range' built-in
This commit is contained in:
Thomas S Hatch 2013-05-16 16:28:18 -07:00
commit bddcf5cb0c
2 changed files with 4 additions and 4 deletions

View File

@ -121,9 +121,9 @@ class LocalClient(object):
return user
def _convert_range_to_list(self, tgt):
range = seco.range.Range(self.opts['range_server'])
range_ = seco.range.Range(self.opts['range_server'])
try:
return range.expand(tgt)
return range_.expand(tgt)
except seco.range.RangeException as err:
print("Range server exception: {0}".format(err))
return []

View File

@ -1485,9 +1485,9 @@ class Matcher(object):
Matches based on range cluster
'''
if HAS_RANGE:
range = seco.range.Range(self.opts['range_server'])
range_ = seco.range.Range(self.opts['range_server'])
try:
return self.opts['grains']['fqdn'] in range.expand(tgt)
return self.opts['grains']['fqdn'] in range_.expand(tgt)
except seco.range.RangeException as e:
log.debug('Range exception in compound match: {0}'.format(e))
return False