diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-01-27 07:10:38 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-01-27 18:49:17 -0500 |
commit | 0db2de2b0a560782dd37c63ab83743affa885111 (patch) | |
tree | 82c18836cde0d4b388ab4e30bb85d3f4134daec5 /mesonbuild/mesonmain.py | |
parent | 5d31735c1e5e2cfac581ebaf82442b1449aa18b8 (diff) | |
download | meson-0db2de2b0a560782dd37c63ab83743affa885111.zip meson-0db2de2b0a560782dd37c63ab83743affa885111.tar.gz meson-0db2de2b0a560782dd37c63ab83743affa885111.tar.bz2 |
do not report context on python traceback, for PermissionError
It's not a MesonBug which needs to be reported, and the existing error
already adequately points out the problematic file.
It is impossible to get a PermissionError for files created by meson
itself, once the build directory has been created, anyway.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 4d873e5..ddb8487 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -155,6 +155,11 @@ class CommandLineParser: if os.environ.get('MESON_FORCE_BACKTRACE'): raise return 1 + except PermissionError: + if os.environ.get('MESON_FORCE_BACKTRACE'): + raise + traceback.print_exc() + return 2 except Exception as e: if os.environ.get('MESON_FORCE_BACKTRACE'): raise |