From 5463aa06b8d3f9dd02225924ff726a14af0878a6 Mon Sep 17 00:00:00 2001 From: Marcus Buffett Date: Thu, 21 Sep 2017 12:15:10 -0700 Subject: [PATCH] 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 --- src/bootstrap/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: