mirror of
https://opendev.org/x/pyghmi
synced 2025-01-28 20:07:42 +00:00
Fix unregister_keepalive when no keepalives registered
If no keepalives are registered, return cleanly from an attempt to unregister rather than raise an exception. Change-Id: I0064714af4ba8f1b62f9061dc0dc481116c871fe
This commit is contained in:
parent
0115a3d79b
commit
5454ab855e
@ -958,6 +958,8 @@ class Session(object):
|
||||
return regid
|
||||
|
||||
def unregister_keepalive(self, regid):
|
||||
if self._customkeepalives is None:
|
||||
return
|
||||
try:
|
||||
del self._customkeepalives[regid]
|
||||
except KeyError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user