2
0
mirror of https://opendev.org/x/pyghmi synced 2026-04-02 00:03:30 +00:00

Do not error on None callback

A keepalive is not required to provide a callback.

Change-Id: Id7b277f60097e0d825b307b15d39b64f2b3447da
This commit is contained in:
Jarrod Johnson
2021-04-16 15:41:25 -04:00
parent de1f5f6c60
commit 96b58359eb

View File

@@ -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