2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 11:48:33 +00:00

Try to clear presence in initting sessions on broken

If a session goes broken while initting, make sure to clear that.

Change-Id: I38a97af68f5d6bc836f477793f98b703b9ac43ff
This commit is contained in:
Jarrod Johnson 2018-07-23 14:14:38 -04:00
parent eec5bcf9cd
commit 50907ea2ca

View File

@ -537,6 +537,12 @@ class Session(object):
Session.keepalive_sessions.pop(self, None)
with util.protect(WAITING_SESSIONS):
Session.waiting_sessions.pop(self, None)
try:
del Session.initting_sessions[(self.bmc, self.userid,
self.password, self.port,
self.kgo)]
except KeyError:
pass
self.logout()
self.logging = False
self.errormsg = error