mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #5064 from hulu/range-shadowing
rename to avoid shadowing 'range' built-in
This commit is contained in:
commit
bddcf5cb0c
@ -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 []
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user