fix some bugs
- fix tests when `--build` is set - don't leak `config.example.toml` fd - don't crash if `config.toml` doesn't exist yet
This commit is contained in:
@@ -400,7 +400,9 @@ def parse_example_config(known_args, config):
|
||||
targets = {}
|
||||
top_level_keys = []
|
||||
|
||||
for line in open(rust_dir + '/config.example.toml').read().split("\n"):
|
||||
with open(rust_dir + '/config.example.toml') as example_config:
|
||||
example_lines = example_config.read().split("\n")
|
||||
for line in example_lines:
|
||||
if cur_section is None:
|
||||
if line.count('=') == 1:
|
||||
top_level_key = line.split('=')[0]
|
||||
|
||||
Reference in New Issue
Block a user