2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-26 03:39:53 +01:00

Use subprocess32 when possible

This commit is contained in:
Thomas Nagy 2016-02-10 23:46:55 +01:00
parent 70df345c3f
commit 5580e8c69f
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -10,7 +10,15 @@ through Python versions 2.3 to 3.X and across different platforms (win32, linux,
"""
import os, sys, errno, traceback, inspect, re, shutil, datetime, gc, platform
import subprocess # <- leave this!
# leave this
if os.name == 'posix' and sys.version_info[0] < 3:
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
else:
import subprocess
from collections import deque, defaultdict