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".
This commit is contained in:
parent
389b2f6785
commit
29ac7dd088
|
@ -52,12 +52,8 @@ def errorhandler(e, command):
|
||||||
if command == 'runpython':
|
if command == 'runpython':
|
||||||
return 2
|
return 2
|
||||||
elif isinstance(e, OSError):
|
elif isinstance(e, OSError):
|
||||||
error_msg = os.linesep.join([
|
mlog.exception("Unhandled python OSError. This is probably not a Meson bug, "
|
||||||
"Unhandled python exception",
|
"but an issue with your build environment.")
|
||||||
f"{e.strerror} - {e.args}",
|
|
||||||
"this is probably not a Meson bug."])
|
|
||||||
|
|
||||||
mlog.exception(error_msg)
|
|
||||||
return e.errno
|
return e.errno
|
||||||
else: # Exception
|
else: # Exception
|
||||||
msg = 'Unhandled python exception'
|
msg = 'Unhandled python exception'
|
||||||
|
|
Loading…
Reference in New Issue