summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2020-11-24 04:25:02 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2020-11-24 04:25:02 (GMT)
commitb0a643847dcf0e37848f9abf7bb1dab0dbd73505 (patch)
tree9bf960bfd9f1cdfd590de18260fb3723481fb478
parent89ff4f3c44f9f0e4e3bfe9a90e5dfda9dd810fd6 (diff)
parent066f50dfd690995ca4ea98528a08454425c702d4 (diff)
downloadSCons-b0a643847dcf0e37848f9abf7bb1dab0dbd73505.zip
SCons-b0a643847dcf0e37848f9abf7bb1dab0dbd73505.tar.gz
SCons-b0a643847dcf0e37848f9abf7bb1dab0dbd73505.tar.bz2
Merge branch 'master' of github.com:SCons/scons
-rwxr-xr-xCHANGES.txt1
-rw-r--r--SCons/Debug.py18
2 files changed, 10 insertions, 9 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 5160b95..6263709 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -82,6 +82,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
tests, can quickly try if a change improves all the fails. Dropped
runtest test for fallback from qmtest, not needed; added new tests.
- Eliminate tex tool usage of "for foo in range(len(iterable))"
+ - Restore internal Trace function to functional state.
From Simon Tegelid
- Fix using TEMPFILE in multiple actions in an action list. Previously a builder, or command
diff --git a/SCons/Debug.py b/SCons/Debug.py
index 2310cb7..f4b802e 100644
--- a/SCons/Debug.py
+++ b/SCons/Debug.py
@@ -196,17 +196,17 @@ TimeStampDefault = False
StartTime = time.time()
PreviousTime = StartTime
-def Trace(msg, filename=None, mode='w', tstamp=False):
+def Trace(msg, tracefile=None, mode='w', tstamp=False):
"""Write a trace message.
Write messages when debugging which do not interfere with stdout.
Useful in tests, which monitor stdout and would break with
unexpected output. Trace messages can go to the console (which is
- opened as a file), or to a disk file; the file argument persists
+ opened as a file), or to a disk file; the tracefile argument persists
across calls unless overridden.
Args:
- filename: file to write trace message to. If omitted,
+ tracefile: file to write trace message to. If omitted,
write to the previous trace file (default: console).
mode: file open mode (default: 'w')
tstamp: write relative timestamps with trace. Outputs time since
@@ -220,23 +220,23 @@ def Trace(msg, filename=None, mode='w', tstamp=False):
def trace_cleanup(traceFP):
traceFP.close()
- if file is None:
- file = TraceDefault
+ if tracefile is None:
+ tracefile = TraceDefault
else:
- TraceDefault = file
+ TraceDefault = tracefile
if not tstamp:
tstamp = TimeStampDefault
else:
TimeStampDefault = tstamp
try:
- fp = TraceFP[file]
+ fp = TraceFP[tracefile]
except KeyError:
try:
- fp = TraceFP[file] = open(file, mode)
+ fp = TraceFP[tracefile] = open(tracefile, mode)
atexit.register(trace_cleanup, fp)
except TypeError:
# Assume we were passed an open file pointer.
- fp = file
+ fp = tracefile
if tstamp:
now = time.time()
fp.write('%8.4f %8.4f: ' % (now - StartTime, now - PreviousTime))