summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-01-14 18:48:24 +0000
committerSteven Knight <knight@baldmt.com>2010-01-14 18:48:24 +0000
commit27fbaa4e2083b7850dd82568291dfea768ae02aa (patch)
tree724307b7cb5560a268035fd5a666f7b26e32ce2e /bin
parent4f13214593363b2763056aec957fb719fafd0014 (diff)
downloadscons-27fbaa4e2083b7850dd82568291dfea768ae02aa.tar.gz
Massage file names in Python stack traces (which are often reported as
absolute paths) to a consistent relative path (bootstrap/...).
Diffstat (limited to 'bin')
-rw-r--r--bin/sconsoutput.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/sconsoutput.py b/bin/sconsoutput.py
index e2237c55..41330599 100644
--- a/bin/sconsoutput.py
+++ b/bin/sconsoutput.py
@@ -745,6 +745,10 @@ class MySGML(sgmllib.SGMLParser):
# Massage addresses in object repr strings to a constant.
address_re = re.compile(r' at 0x[0-9a-fA-F]*\>')
+ # Massage file names in stack traces (sometimes reported as absolute
+ # paths) to a consistent relative path.
+ engine_re = re.compile(r' File ".*/src/engine/SCons/')
+
# Python 2.5 changed the stack trace when the module is read
# from standard input from read "... line 7, in ?" to
# "... line 7, in <module>".
@@ -769,6 +773,7 @@ class MySGML(sgmllib.SGMLParser):
content = string.join(lines, '\n' + p)
if content:
content = address_re.sub(r' at 0x700000&gt;', content)
+ content = engine_re.sub(r' File "bootstrap/src/engine/SCons/', content)
content = file_re.sub(r'\1 <module>', content)
content = nodelist_re.sub(r"\1 'NodeList' object \2", content)
content = string.replace(content, '<', '&lt;')