mirror of
https://github.com/servo/servo.git
synced 2025-06-12 10:24:43 +00:00
Shim subprocess.DEVNULL for Python 2
This was introduced in Python 3.3, so provide our own version.
This commit is contained in:
parent
1428077c02
commit
3cf15cc86d
1 changed files with 9 additions and 7 deletions
|
@ -490,13 +490,15 @@ class PackageCommands(CommandBase):
|
||||||
'--message=Version Bump: {}'.format(brew_version),
|
'--message=Version Bump: {}'.format(brew_version),
|
||||||
])
|
])
|
||||||
|
|
||||||
token = os.environ['GITHUB_HOMEBREW_TOKEN']
|
push_url = 'https://{}@github.com/servo/homebrew-servo.git'
|
||||||
call_git([
|
# TODO(aneeshusa): Use subprocess.DEVNULL with Python 3.3+
|
||||||
'push',
|
with open(os.devnull, 'wb') as DEVNULL:
|
||||||
'-qf',
|
call_git([
|
||||||
'https://{}@github.com/servo/homebrew-servo.git'.format(token),
|
'push',
|
||||||
'master',
|
'-qf',
|
||||||
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
push_url.format(os.environ['GITHUB_HOMEBREW_TOKEN']),
|
||||||
|
'master',
|
||||||
|
], stdout=DEVNULL, stderr=DEVNULL)
|
||||||
|
|
||||||
timestamp = datetime.utcnow().replace(microsecond=0)
|
timestamp = datetime.utcnow().replace(microsecond=0)
|
||||||
for package in PACKAGES[platform]:
|
for package in PACKAGES[platform]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue