2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-12 18:59:06 +00:00

Avoid double-removal of attrib watcher in ipmi

IPMI plugin was issuing redundant calls to remove the same
watcher.  Track that a session has already unhooked to
avoid double unhook (which runs at least a slight risk
of unhooking the wrong handler (*if* it were allowed).
This commit is contained in:
Jarrod Johnson 2016-04-12 13:04:02 -04:00
parent 4ba8a7a997
commit d4357c6984

View File

@ -105,7 +105,9 @@ class IpmiCommandWrapper(ipmicommand.Command):
self.cfm, self.node, 'pubkeys.tls_hardwaremanager').verify_cert)
def close_confluent(self):
self.cfm.remove_watcher(self._attribwatcher)
if self._attribwatcher:
self.cfm.remove_watcher(self._attribwatcher)
self._attribwatcher = None
def _attribschanged(self, nodeattribs, configmanager, **kwargs):
try: