You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/04/11 00:40:22 UTC
svn commit: r1090901 -
/incubator/libcloud/trunk/libcloud/storage/drivers/s3.py
Author: tomaz
Date: Sun Apr 10 22:40:22 2011
New Revision: 1090901
URL: http://svn.apache.org/viewvc?rev=1090901&view=rev
Log:
Use constants.
Modified:
incubator/libcloud/trunk/libcloud/storage/drivers/s3.py
Modified: incubator/libcloud/trunk/libcloud/storage/drivers/s3.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/storage/drivers/s3.py?rev=1090901&r1=1090900&r2=1090901&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/storage/drivers/s3.py (original)
+++ incubator/libcloud/trunk/libcloud/storage/drivers/s3.py Sun Apr 10 22:40:22 2011
@@ -61,9 +61,9 @@ class S3Response(AWSBaseResponse):
return i >= 200 and i <= 299 or i in self.valid_response_codes
def parse_error(self):
- if self.status in [ 401, 403 ]:
+ if self.status in [ httplib.UNAUTHORIZED, httplib.FORBIDDEN ]:
raise InvalidCredsError(self.body)
- elif self.status == 301:
+ elif self.status == httplib.MOVED_PERMANENTLY:
raise LibcloudError('This bucket is located in a different ' +
'region. Please use the correct driver.',
driver=S3StorageDriver)