Skip to content

Commit

Permalink
Rollup merge of #44754 - marcusbuffett:bootstrap-config-toml-fix, r=a…
Browse files Browse the repository at this point in the history
…lexcrichton

Catch IOError in bootstrap.py when loading config.toml

When I pulled this repo and tried to build using the command in the readme, I got an error about a missing `config.toml`.

If config.toml doesn't exist, then an `IOError` will be raised the `with open(...)` line. Prior to e788fa7, this was caught because the `except` clause didn't specify what exceptions it caught, so both `IOError` and `OSError` were caught.

First time contributing, so please let me know if I'm doing anything wrong.
  • Loading branch information
GuillaumeGomez authored Sep 21, 2017
2 parents 9fce9f7 + 5463aa0 commit 6754846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def bootstrap():
try:
with open(args.config or 'config.toml') as config:
build.config_toml = config.read()
except OSError:
except (OSError, IOError):
pass

if '\nverbose = 2' in build.config_toml:
Expand Down

0 comments on commit 6754846

Please sign in to comment.