Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Properly handle NoMethodError exceptions for booting VMs.

  • Loading branch information...
commit 771d1585d309c136ca9c67b24cb35eb74b77d307 1 parent 3f3da84
@jk0 jk0 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/cloud/openstack/helpers.rb
View
4 lib/cloud/openstack/helpers.rb
@@ -20,7 +20,7 @@ def cloud_error(message)
def wait_resource(resource, start_state, target_state, state_method = :status, timeout = DEFAULT_TIMEOUT)
started_at = Time.now
- state = resource.send(state_method).downcase
+ state = resource.send(state_method).downcase rescue state_method
desc = resource.class.name.split("::").last.to_s + " " + resource.id.to_s
while state.to_sym != target_state
@@ -37,7 +37,7 @@ def wait_resource(resource, start_state, target_state, state_method = :status, t
if resource.reload.nil?
state = target_state
else
- state = resource.send(state_method).downcase
+ state = resource.send(state_method).downcase rescue state_method
end
end

0 comments on commit 771d158

Please sign in to comment.
Something went wrong with that request. Please try again.