Skip to content

Commit

Permalink
Merge pull request #52424 from alexvasiu/dev/avasiu/repair_network_se…
Browse files Browse the repository at this point in the history
…ttings

beacons/network_settings.py: Wrong uses of variables
  • Loading branch information
garethgreenaway authored Apr 5, 2019
2 parents 0384824 + a2bc716 commit 0516d5b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions salt/beacons/network_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,14 @@ def beacon(config):
else:
# No direct match, try with * wildcard regexp
interface_regexp = interface.replace('*', '[0-9]+')
for interface in _stats:
match = re.search(interface_regexp, interface)
for _interface in _stats:
match = re.search(interface_regexp, _interface)
if match:
interfaces.append(match.group())
expanded_config[match.group()] = config['interfaces'][interface]
expanded_config[match.group()] = _config['interfaces'][interface]

if expanded_config:
config.update(expanded_config)

# config updated so update _config
list(map(_config.update, config))
_config['interfaces'].update(expanded_config)

log.debug('interfaces %s', interfaces)
for interface in interfaces:
Expand Down

0 comments on commit 0516d5b

Please sign in to comment.