From: Keir Fraser Date: Wed, 4 Feb 2009 11:57:17 +0000 (+0000) Subject: XendAPIStore - do not remove non-existent item X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14003^2~47 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=14e943162932652c818850dcb184b3de77ade143;p=xen.git XendAPIStore - do not remove non-existent item If list is searched and item not found, then don't attempt to delete the item. Signed-off-by: Jim Fehlig --- diff --git a/tools/python/xen/xend/XendAPIStore.py b/tools/python/xen/xend/XendAPIStore.py index 372509d695..dc313717dd 100644 --- a/tools/python/xen/xend/XendAPIStore.py +++ b/tools/python/xen/xend/XendAPIStore.py @@ -33,7 +33,8 @@ def register(uuid, type, inst): def deregister(uuid, type): old = get(uuid, type) - del __classes[(uuid, type)] + if old is not None: + del __classes[(uuid, type)] return old def get(uuid, type):