We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def get_resource(self): #省略 for i in range(len(self.resource_prefix)): if not str(self.resource_prefix[i]).startswith('/'): self.resource_prefix[i] = '/' + self.resource_prefix[i] if self.service_type == 'cos': resource.append("qcs::{service_type}:{region}:uid/{appid}:{bucket}{prefix}".format(service_type=self.service_type, region=self.region, appid=appid, bucket=self.bucket, prefix=self.resource_prefix[i])) elif self.service_type == 'ci': resource.append("qcs::{service_type}:{region}:uid/{appid}:bucket/{bucket}{prefix}".format(service_type=self.service_type, region=self.region, appid=appid, bucket=self.bucket, prefix=self.resource_prefix[i]))
if self.service_type == 'cos': 应该是在 if not str(self.resource_prefix[i]).startswith('/'):外面的
if self.service_type == 'cos':
if not str(self.resource_prefix[i]).startswith('/'):
不然的话第二次调用get_resource就是返回空列表了
scope = Scope('name/cos:PutObject', '11111-1119673638', 'ap-nanjing', ['test/test.txt', 'test/test2.txt']) print(scope.get_resource()) print(scope.get_resource())
The text was updated successfully, but these errors were encountered:
No branches or pull requests
if self.service_type == 'cos':
应该是在if not str(self.resource_prefix[i]).startswith('/'):
外面的不然的话第二次调用get_resource就是返回空列表了
The text was updated successfully, but these errors were encountered: