Merge pull request #2365 from Tomdarkness/fix-virtualbox-driver-retryable

builder/virtualbox: Move exception raising back into retryable block in VirtualBox driver command execution
This commit is contained in:
Mitchell Hashimoto 2013-10-14 19:54:49 -07:00
commit ccdaae69bb
1 changed files with 11 additions and 11 deletions

View File

@ -284,10 +284,10 @@ module VagrantPlugins
# Variable to store our execution result # Variable to store our execution result
r = nil r = nil
retryable(:on => Vagrant::Errors::VBoxManageError, :tries => tries, :sleep => 1) do
# If there is an error with VBoxManage, this gets set to true # If there is an error with VBoxManage, this gets set to true
errored = false errored = false
retryable(:on => Vagrant::Errors::VBoxManageError, :tries => tries, :sleep => 1) do
# Execute the command # Execute the command
r = raw(*command, &block) r = raw(*command, &block)
@ -322,7 +322,6 @@ module VagrantPlugins
errored = true errored = true
end end
end end
end
# If there was an error running VBoxManage, show the error and the # If there was an error running VBoxManage, show the error and the
# output. # output.
@ -331,6 +330,7 @@ module VagrantPlugins
:command => command.inspect, :command => command.inspect,
:stderr => r.stderr :stderr => r.stderr
end end
end
# Return the output, making sure to replace any Windows-style # Return the output, making sure to replace any Windows-style
# newlines with Unix-style. # newlines with Unix-style.