2
0
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:
Jarrod Johnson 2014-05-09 15:58:46 -04:00
parent 0115a3d79b
commit 5454ab855e

View File

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