]> git.lizzy.rs Git - rust.git/commitdiff
Catch IOError
authorMarcus Buffett <marcusbuffett@me.com>
Thu, 21 Sep 2017 19:15:10 +0000 (12:15 -0700)
committerMarcus Buffett <marcusbuffett@me.com>
Thu, 21 Sep 2017 19:15:10 +0000 (12:15 -0700)
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

index f12da29c45b02325d509c29eff30fe5148ca8fa6..4a8c3dcebcb498619186894cd0d92ccdea4d56b1 100644 (file)
@@ -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: