我正在从txt file
读取值,并将它们传递给for
循环,在该循环中对每个值进行一些处理。文件内容为GCP Storage buckets
,如下所示
gs://inxxxx12/
gs://xxxxx1231/ etc
这些值的范围从1个存储桶到100多个存储桶
{
import subprocess
import json
import shlex
buckets = open('permissions.txt', 'r')
for x in buckets:
version_on = "gsutil versioning set on x"
version_on = shlex.split(version_on)
project_output = subprocess.check_output(version_on)
print project_output
我的问题是code
的下面一行
for x in buckets:
version_on = "gsutil versioning set on x"
我正在努力读取for
循环中variables x
的值
下面是错误
['gsutil', 'versioning', 'set', 'on', 'x']
CommandException: "versioning" command does not support "file://" URLs. Did you mean to use a gs:// URL?
有什么建议吗
目前没有回答
相关问题 更多 >
编程相关推荐