incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fvoll...@redhat.com
Subject [PATCH core] Add strip method to avoid unuseful spaces in state message
Date Tue, 23 Aug 2011 16:45:42 GMT
From: Francesco Vollero <fvollero@redhat.com>


Signed-off-by: Francesco Vollero <fvollero@redhat.com>
---
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 8123c8e..d402bc8 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -266,7 +266,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
     unless state.respond_to?(:upcase)
       raise "State #{state.inspect} is not a string"
     end
-    case state.upcase
+    case state.strip.upcase
     when 'WAIT_FOR_LAUNCH', 'REBOOT_IN_PROGRESS', 'SAVING_STATE',
       'RESTORING_STATE', 'POWERING_DOWN', 'POWERING_UP', 'IMAGE_LOCKED', 'SAVING_STATE' then
       'PENDING'
-- 
1.7.4.4


Mime
View raw message