From 50907ea2ca8109b8cb83447f51b41cffc7faab32 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 23 Jul 2018 14:14:38 -0400 Subject: [PATCH] Try to clear presence in initting sessions on broken If a session goes broken while initting, make sure to clear that. Change-Id: I38a97af68f5d6bc836f477793f98b703b9ac43ff --- pyghmi/ipmi/private/session.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index cd762009..2bc34c19 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -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