FYI: I am using this code :
except S3ResponseError, s3error: s3error_string = '%s' % s3error if s3error_string.find('404') >= 0: try: print 'Creating bucket:', self.bucket bucket_instance = s3conn.create_bucket(self.bucket, policy=acl, location=location) except S3CreateError: msg = 'Unable to create bucket %s' % self.bucket self.display_error_and_exit(msg) elif s3error_string.find('403') >= 0: msg = 'You do not have permission to access bucket:', self.bucket self.display_error_and_exit(msg)
from euca2ools/commands/euca/uploadbundle.py , I don't have an AMAZON s3 account so can't test directly with whatever they implemented.
FYI: I am using this code :
except S3ResponseError, s3error:
s3error_ string = '%s' % s3error string. find('404' ) >= 0:
try:
print 'Creating bucket:', self.bucket
bucket_ instance = s3conn. create_ bucket( self.bucket,
policy= acl,
location= location)
except S3CreateError:
msg = 'Unable to create bucket %s' % self.bucket
self. display_ error_and_ exit(msg) string. find('403' ) >= 0:
self. display_ error_and_ exit(msg)
if s3error_
elif s3error_
msg = 'You do not have permission to access bucket:', self.bucket
from euca2ools/ commands/ euca/uploadbund le.py , I don't have an AMAZON s3 account so can't test directly with whatever they implemented.