mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #31719 from techhat/issue31579
Don't worry about KeyErrors if the node is already removed
This commit is contained in:
commit
b936e09fb3
1 changed files with 7 additions and 3 deletions
|
@ -1665,7 +1665,11 @@ class Map(Cloud):
|
|||
if driver not in interpolated_map[alias]:
|
||||
interpolated_map[alias][driver] = {}
|
||||
interpolated_map[alias][driver][vm_name] = vm_details
|
||||
names.remove(vm_name)
|
||||
try:
|
||||
names.remove(vm_name)
|
||||
except KeyError:
|
||||
# If it's not there, then our job is already done
|
||||
pass
|
||||
|
||||
if not names:
|
||||
continue
|
||||
|
@ -1764,7 +1768,7 @@ class Map(Cloud):
|
|||
# - bar2
|
||||
mapping = {mapping: None}
|
||||
for name, overrides in six.iteritems(mapping):
|
||||
if overrides is None:
|
||||
if overrides is None or isinstance(overrides, bool):
|
||||
# Foo:
|
||||
# - bar1:
|
||||
# - bar2:
|
||||
|
@ -1777,7 +1781,7 @@ class Map(Cloud):
|
|||
'is a reserved word. Please change \'name\' to a different '
|
||||
'minion id reference.'
|
||||
)
|
||||
return ''
|
||||
return {}
|
||||
entries[name] = overrides
|
||||
map_[profile] = entries
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue