From: Marcus Buffett Date: Thu, 21 Sep 2017 19:15:10 +0000 (-0700) Subject: Catch IOError X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=5463aa06b8d3f9dd02225924ff726a14af0878a6;p=rust.git Catch IOError 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 --- diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index f12da29c45b..4a8c3dcebcb 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -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: