Skip to content

Commit

Permalink
Catch IOError
Browse files Browse the repository at this point in the history
If config.toml doesn't exist, then an IOError will be raised
on 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
  • Loading branch information
marcusbuffett committed Sep 21, 2017
1 parent 1b55d19 commit 5463aa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def bootstrap():
try: try:
with open(args.config or 'config.toml') as config: with open(args.config or 'config.toml') as config:
build.config_toml = config.read() build.config_toml = config.read()
except OSError: except (OSError, IOError):
pass pass


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

0 comments on commit 5463aa0

Please sign in to comment.