mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
1d274df151
commit
14e9431629
1 file changed
+2
-1
@@ -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):
|
||||
|
||||