From 96b58359ebe2c2effb7165f10a7e7f597f876fe3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 16 Apr 2021 15:41:25 -0400 Subject: [PATCH] Do not error on None callback A keepalive is not required to provide a callback. Change-Id: Id7b277f60097e0d825b307b15d39b64f2b3447da --- pyghmi/ipmi/private/session.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index e30f2ff7..763db680 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -1821,6 +1821,8 @@ class Session(object): # if a code somehow makes duplicate SOL handlers, # this would notify all the handlers rather than just the # last one to take ownership + if self._customkeepalives[ka][1] is None: + continue self._customkeepalives[ka][1]( {'error': 'Session Disconnected'}) self._customkeepalives = None