summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-05-18 05:36:40 (GMT)
committerSteven Knight <knight@baldmt.com>2002-05-18 05:36:40 (GMT)
commit72e3615b951a91dfa7e4eb48e147486607b74938 (patch)
tree284f75858160c1e7c2e1d4a868866c5e1cc43a68 /etc
parent07f253a52bd76d55c41a36480eb38df44338afb3 (diff)
downloadSCons-72e3615b951a91dfa7e4eb48e147486607b74938.zip
SCons-72e3615b951a91dfa7e4eb48e147486607b74938.tar.gz
SCons-72e3615b951a91dfa7e4eb48e147486607b74938.tar.bz2
Ctrl-C Improvements (Anthony Roach)
Diffstat (limited to 'etc')
-rw-r--r--etc/TestCmd.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/TestCmd.py b/etc/TestCmd.py
index 06e324f..17d520b 100644
--- a/etc/TestCmd.py
+++ b/etc/TestCmd.py
@@ -510,7 +510,10 @@ class TestCmd:
elif run < 0:
run = len(self._stderr) + run
run = run - 1
- return self._stderr[run]
+ if run >= len(self._stderr) or run < 0:
+ return ''
+ else:
+ return self._stderr[run]
def stdout(self, run = None):
"""Returns the standard output from the specified run number.
@@ -524,7 +527,10 @@ class TestCmd:
elif run < 0:
run = len(self._stdout) + run
run = run - 1
- return self._stdout[run]
+ if run >= len(self._stdout) or run < 0:
+ return ''
+ else:
+ return self._stdout[run]
def subdir(self, *subdirs):
"""Create new subdirectories under the temporary working