diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-02-04 11:57:17 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-02-04 11:57:17 +0000 |
commit | 14e943162932652c818850dcb184b3de77ade143 (patch) | |
tree | 61da094757960844954cc1f421dea2392fc0ca4a /tools | |
parent | 1d274df151b3b7d28ead42792ced85ae8e94b328 (diff) | |
download | xen-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.py | 3 |
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): |