Update all the print

This commit is contained in:
John Kleinschmidt
2019-11-19 16:44:09 -05:00
parent 349ccafa43
commit 64a423bdbe
2 changed files with 13 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python
from __future__ import print_function
import errno
import os
import platform
@@ -48,7 +49,8 @@ def get_env_var(name):
# TODO Remove ATOM_SHELL_* fallback values
value = os.environ.get('ATOM_SHELL_' + name, '')
if value:
print("Warning: Use $ELECTRON_" + name + " instead of $ATOM_SHELL_" + name)
print('Warning: Use $ELECTRON_' + name +
' instead of $ATOM_SHELL_' + name)
return value
@@ -64,7 +66,7 @@ def s3_config():
def enable_verbose_mode():
print("Running in verbose mode")
print('Running in verbose mode')
global verbose_mode
verbose_mode = True

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python
from __future__ import print_function
import atexit
import contextlib
import datetime
@@ -91,12 +92,12 @@ def download(text, url, path):
if not ci:
percent = downloaded_size * 100. / file_size
status = "\r%s %10d [%3.1f%%]" % (text, downloaded_size, percent)
print status,
print(status, end=' ')
if ci:
print "%s done." % (text)
print("%s done." % (text))
else:
print
print()
return path
@@ -156,15 +157,15 @@ def execute(argv, env=None, cwd=None):
if env is None:
env = os.environ
if is_verbose_mode():
print ' '.join(argv)
print(' '.join(argv))
try:
output = subprocess.check_output(argv, stderr=subprocess.STDOUT,
env=env, cwd=cwd)
if is_verbose_mode():
print output
print(output)
return output
except subprocess.CalledProcessError as e:
print e.output
print(e.output)
raise e
@@ -172,11 +173,11 @@ def execute_stdout(argv, env=None, cwd=None):
if env is None:
env = os.environ
if is_verbose_mode():
print ' '.join(argv)
print(' '.join(argv))
try:
subprocess.check_call(argv, env=env, cwd=cwd)
except subprocess.CalledProcessError as e:
print e.output
print(e.output)
raise e
else:
execute(argv, env, cwd)