[aws] Display user friendly message when accessing non-DNS compliant bucket
@@ -141,6 +141,8 @@ class S3FileSystem(object):
bucket = self._get_bucket(bucket_name)
try:
return bucket.get_key(key_name, validate=validate)
+ except BotoClientError, e:
+ raise S3FileSystemException(_('Failed to access path at "%s": %s') % (path, e.reason))
except S3ResponseError, e:
if e.status in (301, 400):
raise S3FileSystemException(_('Failed to access path: "%s" '
