From: Tomas Sedovic <[email protected]>

The Hardware Profile API call may return only some of the properties we
expect.

Such a behaviour resulted in an uncaught exception. This fix ignores the
missing properties, but doesn't crash on them.

Requires deltacloud-client-0.0.9.8.
---
 src/app/models/hardware_profile.rb |    2 +-
 src/config/environment.rb          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/app/models/hardware_profile.rb 
b/src/app/models/hardware_profile.rb
index 91fa9fc..ad2e26c 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -85,7 +85,7 @@ class HardwareProfile < ActiveRecord::Base
     self.architecture = new_property(api_profile.architecture)
   end
   def new_property(prop)
-    return nil unless prop.present?
+    if prop.nil? return nil
     the_property = HardwareProfileProperty.new(:name  => prop.name,
                                                :kind  => prop.kind.to_s,
                                                :unit  => prop.unit,
diff --git a/src/config/environment.rb b/src/config/environment.rb
index 069b08d..423f224 100644
--- a/src/config/environment.rb
+++ b/src/config/environment.rb
@@ -43,7 +43,7 @@ Rails::Initializer.run do |config|
   # config.gem "hpricot", :version => '0.6', :source => 
"http://code.whytheluckystiff.net";
   # config.gem "aws-s3", :lib => "aws/s3"
   config.gem "authlogic"
-  config.gem "deltacloud-client", :lib => "deltacloud", :version => ">= 
0.0.9.6"
+  config.gem "deltacloud-client", :lib => "deltacloud", :version => ">= 
0.0.9.8"
   config.gem "haml"
   config.gem "will_paginate"
   config.gem "nokogiri", :version => ">= 1.4.0"
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to