diff options
author | Steven Knight <knight@baldmt.com> | 2010-05-25 15:27:45 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-05-25 15:27:45 (GMT) |
commit | 86fbfc8a9d32c7e8e4f0768b6c03f5ea3571853f (patch) | |
tree | d6377b3593154226a11ce60b9d68138653ff2d59 | |
parent | 62251306692fa42493392015cb96cf78d79290ab (diff) | |
download | SCons-86fbfc8a9d32c7e8e4f0768b6c03f5ea3571853f.zip SCons-86fbfc8a9d32c7e8e4f0768b6c03f5ea3571853f.tar.gz SCons-86fbfc8a9d32c7e8e4f0768b6c03f5ea3571853f.tar.bz2 |
Fix capturing timings from a single configuration script.
We were closing the output log file, thinking it was a per-script file,
even though we still write to the original log file for the revision.
-rw-r--r-- | bin/time-scons.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/time-scons.py b/bin/time-scons.py index c0095e8..b7d8ef1 100644 --- a/bin/time-scons.py +++ b/bin/time-scons.py @@ -260,13 +260,15 @@ def do_revisions(cr, opts, branch, revisions, scripts): lf = os.path.join(opts.origin, opts.logsdir, subdir, log_name) out = open(lf, 'w') err = None + close_out = True else: out = stdout err = stderr + close_out = False s = cr.run(script_command(script), stdout=out, stderr=err) if s and status == 0: status = s - if out not in (sys.stdout, None): + if close_out: out.close() out = None |