From 86fbfc8a9d32c7e8e4f0768b6c03f5ea3571853f Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 25 May 2010 15:27:45 +0000 Subject: 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. --- bin/time-scons.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v0.12