mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixup! beacons/avahi_announce.py finding grains
This pull resquest broke the avahi_announce https://github.com/saltstack/salt/pull/45657 because len('grains.') is 7 and not 6 as this change say. What happens now is that is looking in __grains__ for '.{grain_name}' instead of {grain_name}. Signed-off-by: Rares POP <rares.pop@ni.com>
This commit is contained in:
parent
b88ec5258d
commit
c51e732f4d
1 changed files with 1 additions and 1 deletions
|
@ -182,7 +182,7 @@ def beacon(config):
|
|||
for item in _config['txt']:
|
||||
changes_key = 'txt.' + salt.utils.stringutils.to_unicode(item)
|
||||
if _config['txt'][item].startswith('grains.'):
|
||||
grain = _config['txt'][item][6:]
|
||||
grain = _config['txt'][item][7:]
|
||||
grain_index = None
|
||||
square_bracket = grain.find('[')
|
||||
if square_bracket != -1 and grain[-1] == ']':
|
||||
|
|
Loading…
Add table
Reference in a new issue