From 53477b97da13cb674f7b75a0a6bae10c11ab5bd7 Mon Sep 17 00:00:00 2001 From: ShenYuhan Date: Wed, 5 Aug 2020 10:41:39 +0800 Subject: [PATCH] add sts for bos (#736) --- visualdl/io/bfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/visualdl/io/bfile.py b/visualdl/io/bfile.py index dbf75534..69927c41 100644 --- a/visualdl/io/bfile.py +++ b/visualdl/io/bfile.py @@ -218,9 +218,10 @@ class BosFileSystem(object): raise KeyError('${BOS_SK} is not found.') self.max_contents_count = int(os.getenv('BOS_CACHE_COUNT', 1)) self.max_contents_time = int(os.getenv('BOS_CACHE_TIME', 1)) + bos_sts = os.getenv("BOS_STS") self.config = BceClientConfiguration( credentials=BceCredentials(access_key_id, secret_access_key), - endpoint=bos_host) + endpoint=bos_host, security_token=bos_sts) def isfile(self, filename): return exists(filename) -- GitLab