Skip to content

Commit 0962b8f

Browse files
committed
Auto merge of #44754 - marcusbuffett:bootstrap-config-toml-fix, r=alexcrichton
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.
2 parents 17600c1 + 5463aa0 commit 0962b8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def bootstrap():
682682
try:
683683
with open(args.config or 'config.toml') as config:
684684
build.config_toml = config.read()
685-
except OSError:
685+
except (OSError, IOError):
686686
pass
687687

688688
if '\nverbose = 2' in build.config_toml:

0 commit comments

Comments
 (0)