You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/01/23 01:11:46 UTC

svn commit: r902317 - /incubator/libcloud/trunk/libcloud/drivers/ec2.py

Author: pquerna
Date: Sat Jan 23 00:11:46 2010
New Revision: 902317

URL: http://svn.apache.org/viewvc?rev=902317&view=rev
Log:
Show original aws error type in the invalid creds exception to make it easier to debug

Modified:
    incubator/libcloud/trunk/libcloud/drivers/ec2.py

Modified: incubator/libcloud/trunk/libcloud/drivers/ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ec2.py?rev=902317&r1=902316&r2=902317&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/ec2.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/ec2.py Sat Jan 23 00:11:46 2010
@@ -116,9 +116,9 @@
             code, message = err.getchildren()
             err_list.append("%s: %s" % (code.text, message.text))
             if code.text == "InvalidClientTokenId":
-                raise InvalidCredsException(message.text)
+                raise InvalidCredsException(err_list[-1])
             if code.text == "SignatureDoesNotMatch":
-                raise InvalidCredsException(message.text)
+                raise InvalidCredsException(err_list[-1])
         return "\n".join(err_list)
 
 class EC2Connection(ConnectionUserAndKey):