diff options
author | Steven Knight <knight@baldmt.com> | 2008-12-20 14:19:09 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-12-20 14:19:09 (GMT) |
commit | 0543e489a5d573cbd13f9c1af82bc3999676637f (patch) | |
tree | cd0d34c7a511194da243084f773efc55f16588d3 | |
parent | 77ba6ff83fa8a55e6de1802322a127c92165351c (diff) | |
download | SCons-0543e489a5d573cbd13f9c1af82bc3999676637f.zip SCons-0543e489a5d573cbd13f9c1af82bc3999676637f.tar.gz SCons-0543e489a5d573cbd13f9c1af82bc3999676637f.tar.bz2 |
Issue 2247: Don't fail if we can't import a _subprocess module on Windows.
-rw-r--r-- | src/CHANGES.txt | 2 | ||||
-rw-r--r-- | src/engine/SCons/compat/_scons_subprocess.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 86c13fd..d334b64 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,6 +18,8 @@ RELEASE 1.X - XXX - Add a --warn=future-deprecated option for advance warnings about deprecated features that still have warnings hidden by default. + - Don't fail if can't import a _subprocess module on Windows. + From Greg Spencer: - Support implicit dependency scanning of files encoded in utf-8 diff --git a/src/engine/SCons/compat/_scons_subprocess.py b/src/engine/SCons/compat/_scons_subprocess.py index 4cb9e30..68d0e4c 100644 --- a/src/engine/SCons/compat/_scons_subprocess.py +++ b/src/engine/SCons/compat/_scons_subprocess.py @@ -394,7 +394,11 @@ if mswindows: STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0 else: - from _subprocess import * + # SCons: don't die on Python versions that don't have _subprocess. + try: + from _subprocess import * + except ImportError: + pass class STARTUPINFO: dwFlags = 0 hStdInput = None |