aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-09-22 15:00:41 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-09-22 15:24:58 -0400
commit29ac7dd0883454e6d5f26a0d666f13a9faf98238 (patch)
tree3f64b7a2a39895256a34c029bb68ec7501a3b2e8 /mesonbuild
parent389b2f6785a0e281e20205689d2a5729e4378174 (diff)
downloadmeson-29ac7dd0883454e6d5f26a0d666f13a9faf98238.zip
meson-29ac7dd0883454e6d5f26a0d666f13a9faf98238.tar.gz
meson-29ac7dd0883454e6d5f26a0d666f13a9faf98238.tar.bz2
clean up message for OSError errorhandler
Currently it repeats the text of the exception, which appeared immediately above. And strerror is already part of args, so that was then doubled. `str(e)` formats this much better anyway. While we are at it, point out that it is probably a build environment issue, rather than just saying "this is probably not a meson bug". The former comes across a bit more as constructive advice rather than just "idk but it's not our fault".
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/mesonmain.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index fed1e56..2a55c03 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -52,12 +52,8 @@ def errorhandler(e, command):
if command == 'runpython':
return 2
elif isinstance(e, OSError):
- error_msg = os.linesep.join([
- "Unhandled python exception",
- f"{e.strerror} - {e.args}",
- "this is probably not a Meson bug."])
-
- mlog.exception(error_msg)
+ mlog.exception("Unhandled python OSError. This is probably not a Meson bug, "
+ "but an issue with your build environment.")
return e.errno
else: # Exception
msg = 'Unhandled python exception'