mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new warnings introduced in this version, in order to allow for an incremental migration. Bug:1262286 Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This commit is contained in:
committed by
LUCI CQ
parent
9a4db25b50
commit
22bf605bb6
25
fetch.py
25
fetch.py
@@ -56,7 +56,6 @@ class Checkout(object):
|
||||
|
||||
def exists(self):
|
||||
"""Check does this checkout already exist on desired location"""
|
||||
pass
|
||||
|
||||
def init(self):
|
||||
pass
|
||||
@@ -67,18 +66,18 @@ class Checkout(object):
|
||||
return ''
|
||||
if return_stdout:
|
||||
return subprocess.check_output(cmd, **kwargs).decode()
|
||||
else:
|
||||
try:
|
||||
subprocess.check_call(cmd, **kwargs)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# If the subprocess failed, it likely emitted its own distress message
|
||||
# already - don't scroll that message off the screen with a stack trace
|
||||
# from this program as well. Emit a terse message and bail out here;
|
||||
# otherwise a later step will try doing more work and may hide the
|
||||
# subprocess message.
|
||||
print('Subprocess failed with return code %d.' % e.returncode)
|
||||
sys.exit(e.returncode)
|
||||
return ''
|
||||
|
||||
try:
|
||||
subprocess.check_call(cmd, **kwargs)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# If the subprocess failed, it likely emitted its own distress message
|
||||
# already - don't scroll that message off the screen with a stack trace
|
||||
# from this program as well. Emit a terse message and bail out here;
|
||||
# otherwise a later step will try doing more work and may hide the
|
||||
# subprocess message.
|
||||
print('Subprocess failed with return code %d.' % e.returncode)
|
||||
sys.exit(e.returncode)
|
||||
return ''
|
||||
|
||||
|
||||
class GclientCheckout(Checkout):
|
||||
|
||||
Reference in New Issue
Block a user