VMware: handle indexError for snapshot details (#42575)
Fixes: #42539 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
c62d9a023a
commit
dd73bae51a
1 changed files with 4 additions and 2 deletions
|
@ -437,8 +437,10 @@ def list_snapshots(vm):
|
|||
result['snapshots'] = list_snapshots_recursively(vm.snapshot.rootSnapshotList)
|
||||
current_snapref = vm.snapshot.currentSnapshot
|
||||
current_snap_obj = get_current_snap_obj(vm.snapshot.rootSnapshotList, current_snapref)
|
||||
result['current_snapshot'] = deserialize_snapshot_obj(current_snap_obj[0])
|
||||
|
||||
if current_snap_obj:
|
||||
result['current_snapshot'] = deserialize_snapshot_obj(current_snap_obj[0])
|
||||
else:
|
||||
result['current_snapshot'] = dict()
|
||||
return result
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue