From 7208893c3b704f5cf985500401ee8d6df66a9e62 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 30 Aug 2003 16:15:43 +0000 Subject: [PATCH] Portability of test/EnsureVersion.py back to pre-Python-2 versions. git-svn-id: http://scons.tigris.org/svn/scons/trunk@786 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- test/EnsureVersion.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/EnsureVersion.py b/test/EnsureVersion.py index c4005e07..4c67e836 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) -- 2.26.2