SConstruct (5871:8007803be77a) SConstruct (5872:98f6215dffce)
1# -*- mode:python -*-
2
3# Copyright (c) 2009 The Hewlett-Packard Development Company
4# Copyright (c) 2004-2005 The Regents of The University of Michigan
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are

--- 100 unchanged lines hidden (view full) ---

109import SCons
110import SCons.Node
111
112def read_command(cmd, **kwargs):
113 """run the command cmd, read the results and return them
114 this is sorta like `cmd` in shell"""
115 from subprocess import Popen, PIPE, STDOUT
116
1# -*- mode:python -*-
2
3# Copyright (c) 2009 The Hewlett-Packard Development Company
4# Copyright (c) 2004-2005 The Regents of The University of Michigan
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are

--- 100 unchanged lines hidden (view full) ---

109import SCons
110import SCons.Node
111
112def read_command(cmd, **kwargs):
113 """run the command cmd, read the results and return them
114 this is sorta like `cmd` in shell"""
115 from subprocess import Popen, PIPE, STDOUT
116
117 if isinstance(cmd, str):
118 cmd = cmd.split()
119
117 no_exception = 'exception' in kwargs
118 exception = kwargs.pop('exception', None)
119
120 kwargs.setdefault('shell', False)
121 kwargs.setdefault('stdout', PIPE)
122 kwargs.setdefault('stderr', STDOUT)
123 kwargs.setdefault('close_fds', True)
124 try:

--- 773 unchanged lines hidden ---
120 no_exception = 'exception' in kwargs
121 exception = kwargs.pop('exception', None)
122
123 kwargs.setdefault('shell', False)
124 kwargs.setdefault('stdout', PIPE)
125 kwargs.setdefault('stderr', STDOUT)
126 kwargs.setdefault('close_fds', True)
127 try:

--- 773 unchanged lines hidden ---