【发布时间】:2022-07-19 05:11:03
【问题描述】:
我有以下现有的 .config 文件,它是 jenkins 的一部分
test.config
1.1G input/path output/path
我看到了许多使用 configparser 直接更新 config.ini 文件的示例。
但是当我使用 configparser 读取这个 test.config 时,它会返回以下错误
config.read(test.config)
遇到错误
configparsor.MissingSectionHeaderError
我实际上需要如下更新我的 test.config 文件
#input
table_details={'source_path1':'desti_path1',
'source_path2':'desti_path2'}
#expected output in test.config
1.1G source_path1 desti_path1
1.1G source_path2 desti_path2
有什么解决办法吗?
【问题讨论】: