Skip to content

Commit

Permalink
fix(not install error): cos
Browse files Browse the repository at this point in the history
  • Loading branch information
MorvanZhou committed Aug 23, 2024
1 parent 5f97a39 commit 236a557
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/retk/core/utils/cos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

try:
from qcloud_cos import (
CosConfig, CosS3Client, CosServiceError, CosClientError
CosConfig, CosS3Client, CosServiceError
)
except ImportError:
pass
Expand All @@ -32,7 +32,8 @@ def init(self):
Domain=settings.COS_DOMAIN,
Scheme='https',
)
except CosClientError:
except Exception: # pylint: disable=broad-except
# CosClientError
logger.info("COSClient | COS settings not found")
raise ModuleNotFoundError("COS settings not found")
self.domain = settings.COS_DOMAIN or f"{settings.COS_BUCKET_NAME}.cos.{settings.COS_REGION}.myqcloud.com"
Expand Down

0 comments on commit 236a557

Please sign in to comment.