mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Update all the print
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user