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>
This commit is contained in:
Keir Fraser committed 2009-02-04 11:57:17 +00:00
1 parent 1d274df151
commit 14e9431629
1 file changed
+2 -1
+2 -1
View File
@@ -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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.