2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00

Remove redundant key deletion and gracefully tolerate deletion of non-existant key

This commit is contained in:
jbjohnso 2014-04-22 17:11:44 -04:00
parent 371262a2f3
commit fb87555776

View File

@ -810,13 +810,15 @@ class ConfigManager(object):
continue
_mark_dirtykey('groups', group, self.tenant)
for attrib in attributes:
del groupentry[attrib]
if attrib == 'nodes':
groupentry['nodes'] = set()
self._sync_nodes_to_group(
group=group, nodes=(), changeset=changeset)
else:
del groupentry[attrib]
try:
del groupentry[attrib]
except KeyError:
pass
for node in groupentry['nodes']:
nodecfg = self._cfgstore['nodes'][node]
self._do_inheritance(