summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-01-14 18:48:24 (GMT)
committerSteven Knight <knight@baldmt.com>2010-01-14 18:48:24 (GMT)
commitf671be4362a197a6c46e6fe8ee62a562156fa399 (patch)
tree724307b7cb5560a268035fd5a666f7b26e32ce2e /bin
parentbb5c10bf9482f87669a94a9f93b4792f2918b920 (diff)
downloadSCons-f671be4362a197a6c46e6fe8ee62a562156fa399.zip
SCons-f671be4362a197a6c46e6fe8ee62a562156fa399.tar.gz
SCons-f671be4362a197a6c46e6fe8ee62a562156fa399.tar.bz2
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 e2237c5..4133059 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;')