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/02/11 00:17:29 UTC
svn commit: r908742 - /incubator/libcloud/trunk/libcloud/drivers/voxel.py
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)