jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] use subprocess.check_call instead of run

Also set shell=True because we have a string as command line

Change-Id: Iadd06abafa9706b9ffac4c82a6079b412719c283
---
M make_dist.py
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/make_dist.py b/make_dist.py
index b975f47..a285a7f 100644
--- a/make_dist.py
+++ b/make_dist.py
@@ -43,8 +43,8 @@
# Distributed under the terms of the MIT license.
#
import shutil
-import subprocess
import sys
+from subprocess import check_call
from pathlib import Path

from pywikibot import __version__, error, info, input_yn, warning
@@ -140,8 +140,8 @@
local, remote, clear, upgrade, nodist = handle_args()

if upgrade:
- subprocess.run('python -m pip install --upgrade pip')
- subprocess.run('pip install --upgrade setuptools wheel twine ')
+ check_call('python -m pip install --upgrade pip', shell=True)
+ check_call('pip install --upgrade setuptools wheel twine ', shell=True)

if clear:
clear_old_dist()
@@ -159,13 +159,13 @@
cleanup()

if local:
- subprocess.run('pip uninstall pywikibot -y')
- subprocess.run(
- 'pip install --no-index --pre --find-links=dist pywikibot')
+ check_call('pip uninstall pywikibot -y', shell=True)
+ check_call('pip install --no-index --pre --find-links=dist pywikibot',
+ shell=True)

if remote and input_yn(
'<<lightblue>>Upload dist to pypi', automatic_quit=False):
- subprocess.run('twine upload dist/*')
+ check_call('twine upload dist/*', shell=True)


if __name__ == '__main__':

To view, visit change 825366. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iadd06abafa9706b9ffac4c82a6079b412719c283
Gerrit-Change-Number: 825366
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged