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:
parent
687ebbfe88
commit
27c7243219
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue