diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-07-01 22:52:17 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-07-02 00:03:02 +0200 |
| commit | e5e2fe5a6f084fb98c2c9b4adec0383fec4a5256 (patch) | |
| tree | c0670e6a3d7ced09a403e0ae0b0c60c2ffc21375 /testsuite.py | |
| parent | 5be5bfbc401a4e3021198145e8b7c9a70f0fae5c (diff) | |
Catch EnvironmentError instead of OSError/IOError
menuconfig.py tended to crash on I/O errors on Python 2, due to
forgetting to update some 'except OSError's. Catch EnvironmentError
instead.
EnvironmentError is a common base class of IOError and OSError on Python
2, and an alias for OSError on Python 3. Use it elsewhere too, as it
might help catch obscure I/O errors on Python 2.
Diffstat (limited to 'testsuite.py')
| -rw-r--r-- | testsuite.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite.py b/testsuite.py index d5f9726..92a8987 100644 --- a/testsuite.py +++ b/testsuite.py @@ -3111,7 +3111,7 @@ def equal_configs(): try: f = open("._config") - except IOError as e: + except EnvironmentError as e: if e.errno != errno.ENOENT: raise print("._config not found. Did you forget to apply the Makefile patch?") |
