mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Seems like some of these can be nil
This commit is contained in:
parent
0a1677242a
commit
d0281a3b41
@ -28,8 +28,12 @@ do_kill = (ARGV.include? 'kill' or ARGV.include? '--kill' or ARGV.include? '-k')
|
||||
|
||||
lines = `VBoxManage list vms`
|
||||
vms = lines.split(/\n/)
|
||||
if vms.nil?
|
||||
vms = []
|
||||
end
|
||||
vms.each do |vmline|
|
||||
vm_info = /\"(.*)\"[^{]*\{(.*)\}/.match(vmline)
|
||||
next if vm_info.nil?
|
||||
vm_name = vm_info[1]
|
||||
vm_uuid = vm_info[2]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user