diff options
author | anatoly techtonik <techtonik@gmail.com> | 2012-12-12 14:33:12 (GMT) |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2012-12-12 14:33:12 (GMT) |
commit | ba2069cfbbed1bdc0b32dd6853aada258755884a (patch) | |
tree | 441c691ee6284943f16ac88479e4431ab9fbed09 /runtest.py | |
parent | 0ff075783f70190674512809c012d2467729e22d (diff) | |
download | SCons-ba2069cfbbed1bdc0b32dd6853aada258755884a.zip SCons-ba2069cfbbed1bdc0b32dd6853aada258755884a.tar.gz SCons-ba2069cfbbed1bdc0b32dd6853aada258755884a.tar.bz2 |
os.spawnv is here since Python 1.6, removing compatibility code
Diffstat (limited to 'runtest.py')
-rw-r--r-- | runtest.py | 21 |
1 files changed, 5 insertions, 16 deletions
@@ -390,22 +390,11 @@ if use_subprocess: else: has_subprocess = False # Set up lowest-common-denominator spawning of a process on both Windows - # and non-Windows systems that works all the way back to Python 1.5.2. - try: - os.spawnv - except AttributeError: - def spawn_it(command_args): - pid = os.fork() - if pid == 0: - os.execv(command_args[0], command_args) - else: - pid, status = os.waitpid(pid, 0) - return (None, None, status >> 8) - else: - def spawn_it(command_args): - command = command_args[0] - command_args = [escape(c) for c in command_args] - return (None, None, os.spawnv(os.P_WAIT, command, command_args)) + # and non-Windows systems that works all the way back to Python 1.6 + def spawn_it(command_args): + command = command_args[0] + command_args = [escape(c) for c in command_args] + return (None, None, os.spawnv(os.P_WAIT, command, command_args)) class Base(object): def __init__(self, path, spe=None): |