[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Garrett Holmstrom gholms at fedoraproject.org
Sun Jun 16 02:30:24 UTC 2013


The following commit has been merged in the master branch:
commit e83aa9bb3148dd4af489a634ccc547d8321c20da
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Wed Feb 20 14:14:18 2013 -0800

    Unbreak EC2 error response parsing

diff --git a/euca2ools/exceptions.py b/euca2ools/exceptions.py
index 6a301ca..001174a 100644
--- a/euca2ools/exceptions.py
+++ b/euca2ools/exceptions.py
@@ -148,6 +148,10 @@ class AWSError(requestbuilder.exceptions.ServerError):
             try:
                 parsed = parse_aws_xml(io.StringIO(six.text_type(self.body)))
                 parsed = parsed[parsed.keys()[0]]  # Strip off the root element
+                if 'Errors' in parsed:
+                    # This could probably be improved, but meh.  Patches are
+                    # welcome.  :)
+                    parsed = parsed['Errors']
                 if 'Error' in parsed:
                     parsed = parsed['Error']
                 self.code     = parsed.get('Code')

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list