Skip to content
Browse files

Fix the boto.cloudformation.stack.Tag class to parse the XML object

correctly when the member 'Value' comes before the member 'Key'.
  • Loading branch information...
1 parent ac7a73e commit dc8e0cb9bcaaf21e45cac694cdf653f2e94c3e97 @georgegoh georgegoh committed Jan 10, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 boto/cloudformation/stack.py
View
8 boto/cloudformation/stack.py
@@ -200,6 +200,7 @@ def __init__(self, connection=None):
dict.__init__(self)
self.connection = connection
self._current_key = None
+ self._current_value = None
def startElement(self, name, attrs, connection):
return None
@@ -208,9 +209,14 @@ def endElement(self, name, value, connection):
if name == "Key":
self._current_key = value
elif name == "Value":
- self[self._current_key] = value
+ self._current_value = value
else:
setattr(self, name, value)
+
+ if self._current_key and self._current_value:
+ self[self._current_key] = self._current_value
+ self._current_key = None
+ self._current_value = None
class NotificationARN(object):

0 comments on commit dc8e0cb

Please sign in to comment.
Something went wrong with that request. Please try again.