aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-04 11:57:17 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-04 11:57:17 +0000
commit14e943162932652c818850dcb184b3de77ade143 (patch)
tree61da094757960844954cc1f421dea2392fc0ca4a /tools
parent1d274df151b3b7d28ead42792ced85ae8e94b328 (diff)
downloadxen-14e943162932652c818850dcb184b3de77ade143.tar.gz
xen-14e943162932652c818850dcb184b3de77ade143.tar.bz2
xen-14e943162932652c818850dcb184b3de77ade143.zip
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 <jfehlig@novell.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendAPIStore.py3
1 files changed, 2 insertions, 1 deletions
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):