From 14effbaba03e69c1b01bced6bc560a442931d5dd Mon Sep 17 00:00:00 2001 From: Paul Lewis Date: Mon, 2 Dec 2019 14:56:40 +0000 Subject: [PATCH] Fixes string interpolation in exclusive changes dir Change-Id: I2a06155b184e197b25ed97a6f3f1e09595af97a2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1946475 Commit-Queue: Paul Lewis Commit-Queue: Tim van der Lippe Auto-Submit: Paul Lewis Reviewed-by: Tim van der Lippe --- PRESUBMIT.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 7eb165fa6a..044d37f25e 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -59,6 +59,7 @@ def _CheckChangesAreExclusiveToDirectory(input_api, output_api): affected_files = input_api.LocalPaths() num_affected = len(affected_files) for dirs in EXCLUSIVE_CHANGE_DIRECTORIES: + dir_list = ', '.join(dirs) affected_in_dir = filter(lambda f: FileIsInDir(f, dirs), affected_files) num_in_dir = len(affected_in_dir) if num_in_dir == 0: @@ -69,9 +70,8 @@ def _CheckChangesAreExclusiveToDirectory(input_api, output_api): if num_in_dir < num_affected: return [ output_api - .PresubmitError('CLs that affect files in "%s" should be limited to these files/directories.' + - ' You can disable this check by adding DISABLE_THIRD_PARTY_CHECK= to your commit message' % - ', '.join(dirs)) + .PresubmitError(('CLs that affect files in "%s" should be limited to these files/directories.' % dir_list) + + ' You can disable this check by adding DISABLE_THIRD_PARTY_CHECK= to your commit message') ] return []