summaryrefslogtreecommitdiffstats
path: root/test/EnsureVersion.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-08-30 16:15:43 (GMT)
committerSteven Knight <knight@baldmt.com>2003-08-30 16:15:43 (GMT)
commitdc59d7046d9705c6b6f7bd6aa88a6a8b620c66f2 (patch)
tree72280b45eaba4dd74777313c25264bef0d2bb273 /test/EnsureVersion.py
parent0d3be1bac1e8d3c3edb574ef918cc44c24286f0b (diff)
downloadSCons-dc59d7046d9705c6b6f7bd6aa88a6a8b620c66f2.zip
SCons-dc59d7046d9705c6b6f7bd6aa88a6a8b620c66f2.tar.gz
SCons-dc59d7046d9705c6b6f7bd6aa88a6a8b620c66f2.tar.bz2
Portability of test/EnsureVersion.py back to pre-Python-2 versions.
Diffstat (limited to 'test/EnsureVersion.py')
-rw-r--r--test/EnsureVersion.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/test/EnsureVersion.py b/test/EnsureVersion.py
index c4005e0..4c67e83 100644
--- a/test/EnsureVersion.py
+++ b/test/EnsureVersion.py
@@ -78,7 +78,10 @@ sys.exit(0)
test.write('SConstruct', """\
import sys
-delattr(sys, 'version_info')
+try:
+ delattr(sys, 'version_info')
+except AttributeError:
+ pass
sys.version = '2.3b1 (#0, Feb 24 2003, 19:13:11)\\n'
EnsurePythonVersion(1,3)
sys.exit(0)
@@ -88,7 +91,10 @@ test.run()
test.write('SConstruct', """\
import sys
-delattr(sys, 'version_info')
+try:
+ delattr(sys, 'version_info')
+except AttributeError:
+ pass
sys.version = '2.3+ (#0, Feb 24 2003, 19:13:11)\\n'
EnsurePythonVersion(2,2)
sys.exit(0)
@@ -98,7 +104,10 @@ test.run()
test.write('SConstruct', """\
import sys
-delattr(sys, 'version_info')
+try:
+ delattr(sys, 'version_info')
+except AttributeError:
+ pass
sys.version = '2.3b1 (#0, Feb 24 2003, 19:13:11)\\n'
EnsurePythonVersion(2,3)
sys.exit(0)
@@ -108,7 +117,10 @@ test.run()
test.write('SConstruct', """\
import sys
-delattr(sys, 'version_info')
+try:
+ delattr(sys, 'version_info')
+except AttributeError:
+ pass
sys.version = '2.3b1 (#0, Feb 24 2003, 19:13:11)\\n'
EnsurePythonVersion(2,4)
sys.exit(0)