From 367f7ae2a2f95b3d88a3a04af649730ed3b32150 Mon Sep 17 00:00:00 2001 From: Josh Lane Date: Mon, 29 Dec 2014 14:20:07 -0800 Subject: [PATCH] get_topic_attributes handle nil values * also correctly rstrip request id --- lib/fog/aws/parsers/sns/get_topic_attributes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fog/aws/parsers/sns/get_topic_attributes.rb b/lib/fog/aws/parsers/sns/get_topic_attributes.rb index c1e9df35e..c5d851ce9 100644 --- a/lib/fog/aws/parsers/sns/get_topic_attributes.rb +++ b/lib/fog/aws/parsers/sns/get_topic_attributes.rb @@ -16,10 +16,10 @@ module Fog when 'SubscriptionsConfirmed', 'SubscriptionsDeleted', 'SubscriptionsPending' @response['Attributes'][@key] = @value.rstrip.to_i else - @response['Attributes'][@key] = @value.rstrip + @response['Attributes'][@key] = (@value && @value.rstrip) || nil end when 'RequestId' - @response[name] = @value + @response[name] = @value.rstrip end end end