Fix snapshort revert functionality

This commit is contained in:
Scott Schneider 2015-07-16 11:37:18 -07:00
parent 1689133b19
commit 85aad61192

View file

@ -102,8 +102,6 @@ module Vmpooler
def find_snapshot(vm, snapshotname) def find_snapshot(vm, snapshotname)
if vm.snapshot if vm.snapshot
get_snapshot_list(vm.snapshot.rootSnapshotList, snapshotname) get_snapshot_list(vm.snapshot.rootSnapshotList, snapshotname)
else
return []
end end
end end
@ -187,7 +185,7 @@ module Vmpooler
end end
def get_snapshot_list(tree, snapshotname) def get_snapshot_list(tree, snapshotname)
snapshot = [] snapshot = nil
tree.each do |child| tree.each do |child|
if child.name == snapshotname if child.name == snapshotname