From 57679f4256d83c34ed4fc55df95c3231d929369d Mon Sep 17 00:00:00 2001 From: Edward Muller Date: Thu, 15 Nov 2012 18:47:31 -0800 Subject: [PATCH] Fix describe_instances stateReason handling Before this the state_reason code was always 0 ('..'.to_i) and message was lost --- lib/fog/aws/parsers/compute/describe_instances.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fog/aws/parsers/compute/describe_instances.rb b/lib/fog/aws/parsers/compute/describe_instances.rb index 3a13bb0bd..3308b6dd4 100644 --- a/lib/fog/aws/parsers/compute/describe_instances.rb +++ b/lib/fog/aws/parsers/compute/describe_instances.rb @@ -41,7 +41,9 @@ module Fog when *@contexts @context.pop when 'code' - @instance[@context.last][name] = value.to_i + @instance[@context.last][name] = @context.last == 'stateReason' ? value : value.to_i + when 'message' + @instance[@context.last][name] = value when 'deleteOnTermination' @block_device_mapping[name] = (value == 'true') when 'deviceName', 'status', 'volumeId'