Browse Source

HUE-8737 [s3] Avoid 500 with Python3 on exception catching

message attribute does not exist anymore
Romain 5 năm trước cách đây
mục cha
commit
9beeacbc9e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      desktop/libs/aws/src/aws/s3/s3fs.py

+ 1 - 1
desktop/libs/aws/src/aws/s3/s3fs.py

@@ -195,7 +195,7 @@ class S3FileSystem(object):
       else:
         raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, e.reason))
     except Exception as e: # SSL errors show up here, because they've been remapped in boto
-      raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, e.message))
+      raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, str(e)))
     if key is None:
       key = self._get_key(path, validate=False)
     return self._stats_key(key, self.fs)