From 0543e489a5d573cbd13f9c1af82bc3999676637f Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sat, 20 Dec 2008 14:19:09 +0000 Subject: Issue 2247: Don't fail if we can't import a _subprocess module on Windows. --- src/CHANGES.txt | 2 ++ src/engine/SCons/compat/_scons_subprocess.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v0.12