On Win32 systems, supply a default if PATHEXT isn't in the environment; it doesn...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 28 Aug 2002 16:01:52 +0000 (16:01 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 28 Aug 2002 16:01:52 +0000 (16:01 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@450 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Util.py
test/Repository/StaticLibrary.py
test/Repository/link-object.py

index 51789566e5db9d333ffc4ae6a75268aa1db87a1a..63c992e33d3d8874e3168e61e9748547e52e1ff5 100644 (file)
@@ -433,7 +433,10 @@ if sys.platform == 'win32':
         if is_String(path):
             path = string.split(path, os.pathsep)
         if pathext is None:
-            pathext = os.environ['PATHEXT']
+            try:
+                pathext = os.environ['PATHEXT']
+            except KeyError:
+                pathext = '.COM;.EXE;.BAT;.CMD'
         if is_String(pathext):
             pathext = string.split(pathext, os.pathsep)
         for ext in pathext:
index 3861ce9d2968c6955f83caa46d24afa102457bef..14b9c3ba0ec326e00fcb81b4d0f51cc9dd7bf17c 100644 (file)
@@ -115,7 +115,7 @@ test.fail_test(os.path.exists(repository_foo))
 
 test.up_to_date(chdir = 'work1', options = opts, arguments = ".")
 
-test.write(['work1', 'bbb.c'], """
+test.write(['work1', 'bbb.c'], r"""
 void
 bbb(void)
 {
@@ -161,7 +161,7 @@ test.writable('repository', 0)
 #
 test.up_to_date(chdir = 'work2', options = opts, arguments = ".")
 
-test.write(['work2', 'bbb.c'], """
+test.write(['work2', 'bbb.c'], r"""
 void
 bbb(void)
 {
index af0214e5b05428c7d31f7aaa2d19d057ac6256be..90d2e70e08945e17e69f7677d2bdbdedddb454c3 100644 (file)
@@ -106,7 +106,7 @@ env.Program(target = 'foo', source = ['aaa.c', 'bbb.c', 'foo.c'])
 test.up_to_date(chdir = 'work', arguments = ".")
 
 #
-test.write(['work', 'bbb.c'], """
+test.write(['work', 'bbb.c'], r"""
 void
 bbb(void)
 {