mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-28 02:23:52 +02:00
feat: merge fixbug/rfc135_merge_geekan_cli_etc_1445
This commit is contained in:
parent
8636026c55
commit
a9479843f6
8 changed files with 33 additions and 16 deletions
|
|
@ -152,3 +152,19 @@ class S3:
|
|||
logger.exception(f"{e}, stack:{traceback.format_exc()}")
|
||||
pathname.unlink(missing_ok=True)
|
||||
return None
|
||||
|
||||
@property
|
||||
def is_valid(self):
|
||||
is_invalid = (
|
||||
not CONFIG.S3_ACCESS_KEY
|
||||
or CONFIG.S3_ACCESS_KEY == "YOUR_S3_ACCESS_KEY"
|
||||
or not CONFIG.S3_SECRET_KEY
|
||||
or CONFIG.S3_SECRET_KEY == "YOUR_S3_SECRET_KEY"
|
||||
or not CONFIG.S3_ENDPOINT_URL
|
||||
or CONFIG.S3_ENDPOINT_URL == "YOUR_S3_ENDPOINT_URL"
|
||||
or not CONFIG.S3_BUCKET
|
||||
or CONFIG.S3_BUCKET == "YOUR_S3_BUCKET"
|
||||
)
|
||||
if is_invalid:
|
||||
logger.info("S3 is invalid")
|
||||
return not is_invalid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue