Move exception raising back into retryable block in VirtualBox driver command execution

By moving the exception throwing back into the retryable block it actually enables the retryable to function properly by retrying, if appropriate, when an certain exception is raised.
This commit is contained in:
Tomdarkness 2013-10-11 18:32:54 +01:00
parent 687ebbfe88
commit 27c7243219
1 changed files with 11 additions and 11 deletions

View File

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