mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #409 from cmeiklejohn/fix_simpledb_attribute_test_errors
Fix failures in the simpledb tests.
This commit is contained in:
commit
6c2d3f455c
1 changed files with 4 additions and 4 deletions
|
@ -50,15 +50,15 @@ module Fog
|
||||||
def get_attributes(domain_name, item_name, options = {})
|
def get_attributes(domain_name, item_name, options = {})
|
||||||
unless options.empty? || options['AttributeName']
|
unless options.empty? || options['AttributeName']
|
||||||
Formatador.display_line("[yellow][WARN] get_attributes with array attributes param is deprecated, use 'AttributeName' => attributes) instead[/] [light_black](#{caller.first})[/]")
|
Formatador.display_line("[yellow][WARN] get_attributes with array attributes param is deprecated, use 'AttributeName' => attributes) instead[/] [light_black](#{caller.first})[/]")
|
||||||
options['AttributeName'] ||= options
|
options['AttributeName'] ||= options if options.is_a?(Array)
|
||||||
end
|
end
|
||||||
option['AttributeName'] ||= []
|
options['AttributeName'] ||= []
|
||||||
response = Excon::Response.new
|
response = Excon::Response.new
|
||||||
if self.data[:domains][domain_name]
|
if self.data[:domains][domain_name]
|
||||||
object = {}
|
object = {}
|
||||||
if options['AttributeName']
|
if !options['AttributeName'].empty?
|
||||||
for attribute in options['AttributeName']
|
for attribute in options['AttributeName']
|
||||||
if self.data[:domains][domain_name][item_name] && self.data[:domains][domain_name][item_name]
|
if self.data[:domains][domain_name].has_key?(item_name) && self.data[:domains][domain_name][item_name].has_key?(attribute)
|
||||||
object[attribute] = self.data[:domains][domain_name][item_name][attribute]
|
object[attribute] = self.data[:domains][domain_name][item_name][attribute]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue