Fix formatting of print in run function.

This commit is contained in:
Umair Khan 2016-09-23 14:27:14 +05:00 committed by Tim Abbott
parent 81174fa580
commit b4214ec8cb
1 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,11 @@ def run(args, **kwargs):
# type: (Sequence[str], **Any) -> int # type: (Sequence[str], **Any) -> int
# Output what we're doing in the `set -x` style # Output what we're doing in the `set -x` style
print("+ %s" % (" ".join(args))) print("+ %s" % (" ".join(args)))
if kwargs.get('shell'):
# With shell=True we can only pass string to Popen
args = " ".join(args)
process = subprocess.Popen(args, **kwargs) process = subprocess.Popen(args, **kwargs)
rc = process.wait() rc = process.wait()
if rc: if rc: