소스 검색

HUE-6694 [aws] Gracefully handle bucket creation error for non-DNS compliant names

Jenny Kim 8 년 전
부모
커밋
639b3e2
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      desktop/libs/aws/src/aws/s3/s3fs.py

+ 2 - 0
desktop/libs/aws/src/aws/s3/s3fs.py

@@ -165,6 +165,8 @@ class S3FileSystem(object):
 
 
     try:
     try:
       key = self._get_key(path, validate=True)
       key = self._get_key(path, validate=True)
+    except BotoClientError, e:
+      raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, e.reason))
     except S3ResponseError as e:
     except S3ResponseError as e:
       if e.status == 404:
       if e.status == 404:
         return None
         return None