From 1bb75d16d3ef0102fa30cc333540af752aa2449a Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 20 Dec 2008 14:19:09 +0000 Subject: [PATCH] Issue 2247: Don't fail if we can't import a _subprocess module on Windows. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3837 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 86c13fd7..d334b64d 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 4cb9e303..68d0e4c8 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 -- 2.26.2