summaryrefslogtreecommitdiff
path: root/QMTest
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-17 13:16:00 +0000
committerGreg Noel <GregNoel@tigris.org>2010-04-17 13:16:00 +0000
commit65370312ea45bf85ebb5ddd64ecc97764c0cdad5 (patch)
tree61e16d3edbaa1230dfa20699c4584c87d9b3f725 /QMTest
parentea67705c79da513fe8e6c12b0ffb4b6c29e4fac8 (diff)
downloadscons-65370312ea45bf85ebb5ddd64ecc97764c0cdad5.tar.gz
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Fix the 'assignment to True or False' and the '__getitem__ not supported for exception classes' deprecation warnings.
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestCmd.py2
-rw-r--r--QMTest/TestSCons.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index 1568b0de..1dff4a6b 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -765,7 +765,7 @@ class Popen(subprocess.Popen):
try:
written = os.write(self.stdin.fileno(), input)
except OSError, why:
- if why[0] == errno.EPIPE: #broken pipe
+ if why.args[0] == errno.EPIPE: #broken pipe
return self._close('stdin')
raise
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index a4e9c86c..561dcda5 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -24,12 +24,10 @@ import sys
import time
try:
- x = True
+ True
except NameError:
- True = not 0
- False = not 1
-else:
- del x
+ exec('True = not 0')
+ exec('False = not 1')
from TestCommon import *
from TestCommon import __all__