scons
scons copied to clipboard
Improve conversion to BuildError
In some cases, the conversion of another exception to a BuildError could yield undesired results: if the exception was a OSError/IOError, and some fields were initially set to None, then the return code and error string were set to None, rather than the SCons defaults (which are return code 2, and the string set originally in the exception).
A unit test is added which attempts to build an OSError in the way that the case "in the wild" does - confirmed failing to pick up defaults without the change.
Fixes #4530
Contributor Checklist:
- [X] I have created a new test or updated the unit tests to cover the new/changed functionality.
- [X] I have updated
CHANGES.txt(and read theREADME.rst) - [X] I have updated the appropriate documentation