diff options
Diffstat (limited to 'src/engine/SCons/Errors.py')
-rw-r--r-- | src/engine/SCons/Errors.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/engine/SCons/Errors.py b/src/engine/SCons/Errors.py index dae20b2..3746d5d 100644 --- a/src/engine/SCons/Errors.py +++ b/src/engine/SCons/Errors.py @@ -190,14 +190,13 @@ def convert_to_BuildError(status, exc_info=None): # error, which might be different from the target being built # (for example, failure to create the directory in which the # target file will appear). - try: - filename = status.filename - except AttributeError: - filename = None + filename = getattr(status, 'filename', None) + strerror = getattr(status, 'strerror', str(status)) + errno = getattr(status, 'errno', 2) buildError = BuildError( - errstr=status.strerror, - status=status.errno, + errstr=strerror, + status=errno, exitstatus=2, filename=filename, exc_info=exc_info) |