Changeset 272397 in webkit


Ignore:
Timestamp:
Feb 4, 2021 4:27:25 PM (3 years ago)
Author:
Jonathan Bedard
Message:

[Python-3] Change shebang in git-webkit (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Unreviewed follow-up fix.

  • Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py:

(run): Python 3.6 does not support capture_output in subprocess.run()

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r272385 r272397  
     12021-02-04  Jonathan Bedard  <jbedard@apple.com>
     2
     3        [Python-3] Change shebang in git-webkit (Follow-up fix)
     4        https://bugs.webkit.org/show_bug.cgi?id=221412
     5        <rdar://problem/73983881>
     6
     7        Unreviewed follow-up fix.
     8
     9        * Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py:
     10        (run): Python 3.6 does not support capture_output in subprocess.run()
     11
    1122021-02-04  Jonathan Bedard  <jbedard@apple.com>
    213
  • trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py

    r268373 r272397  
    3535    def run(*popenargs, **kwargs):
    3636        timeout = kwargs.pop('timeout', None)
     37        capture_output = kwargs.pop('capture_output', False)
    3738
    3839        with Timeout.DisableAlarm():
     
    4344            if difference:
    4445                timeout = min(timeout or sys.maxsize, int(math.ceil(difference)))
     46            if capture_output:
     47                if ('stdout' in kwargs) or ('stderr' in kwargs):
     48                    raise ValueError('stdout and stderr arguments may not be used with capture_output.')
     49                kwargs['stdout'] = subprocess.PIPE
     50                kwargs['stderr'] = subprocess.PIPE
    4551            return subprocess.run(*popenargs, timeout=timeout, **kwargs)
    4652
Note: See TracChangeset for help on using the changeset viewer.