Skip owners file format check on skip_owners

CheckOwnersFormat requires network and code owners plugin to be enabled.
This moves that check under condition.

R=jojwang@google.com

Change-Id: Ic9cfd5e33987cac9aae93d744ebfb2482eb309be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4571106
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/06/4571106/2
Josip Sokcevic 2 years ago committed by LUCI CQ
parent 4dfbc0a3a9
commit 04afb4b256

@ -1467,16 +1467,14 @@ def PanProjectChecks(input_api, output_api,
snapshot("checking owners files format")
try:
if not 'PRESUBMIT_SKIP_NETWORK' in _os.environ:
if not 'PRESUBMIT_SKIP_NETWORK' in _os.environ and owners_check:
snapshot("checking owners")
results.extend(
input_api.canned_checks.CheckOwnersFormat(input_api, output_api))
if owners_check:
snapshot("checking owners")
results.extend(
input_api.canned_checks.CheckOwners(input_api,
output_api,
source_file_filter=None))
results.extend(
input_api.canned_checks.CheckOwners(input_api,
output_api,
source_file_filter=None))
except Exception as e:
print('Failed to check owners - %s' % str(e))

Loading…
Cancel
Save