diff --git a/lib/vmpooler/vsphere_helper.rb b/lib/vmpooler/vsphere_helper.rb index e571e57..1d44af2 100644 --- a/lib/vmpooler/vsphere_helper.rb +++ b/lib/vmpooler/vsphere_helper.rb @@ -102,8 +102,6 @@ module Vmpooler def find_snapshot(vm, snapshotname) if vm.snapshot get_snapshot_list(vm.snapshot.rootSnapshotList, snapshotname) - else - return [] end end @@ -187,7 +185,7 @@ module Vmpooler end def get_snapshot_list(tree, snapshotname) - snapshot = [] + snapshot = nil tree.each do |child| if child.name == snapshotname