mirror of
https://opendev.org/x/pyghmi
synced 2025-11-01 20:02:24 +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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user