libcloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r908742 - /incubator/libcloud/trunk/libcloud/drivers/voxel.py
Date Wed, 10 Feb 2010 23:17:29 GMT
Author: pquerna
Date: Wed Feb 10 23:17:26 2010
New Revision: 908742

URL: http://svn.apache.org/viewvc?rev=908742&view=rev
Log:
Exception 9 can also be invalid perms

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

Modified: incubator/libcloud/trunk/libcloud/drivers/voxel.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/voxel.py?rev=908742&r1=908741&r2=908742&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/voxel.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/voxel.py Wed Feb 10 23:17:26 2010
@@ -48,7 +48,10 @@
         for err in self.parsed.findall('err'):
             code = err.get('code')
             err_list.append("(%s) %s" % (code, err.get('msg')))
-            if code == "1":
+            # From voxel docs:
+            # 1: Invalid login or password
+            # 9: Permission denied: user lacks access rights for this method
+            if code == "1" or code = "9":
                 # sucks, but only way to detect bad authentication tokens so far
                 raise InvalidCredsException(err_list[-1])
         return "\n".join(err_list)



Mime
View raw message