From 71e4cea6deeccafbd3f4c16f2faa157a0a62750c Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 16 Aug 2016 12:05:09 -0700 Subject: [PATCH] RepoHook: do not list options twice during hash based approval Instead of Do you want to allow this script to run (yes/yes-never-ask-again/NO)? (yes/always/NO)? ask Do you want to allow this script to run (yes/always/NO)? Change-Id: I5f5a2d0e88086a8d85e54fb8623a62d74a20956a Signed-off-by: Jonathan Nieder --- project.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/project.py b/project.py index 019f29d4..46e06bf8 100644 --- a/project.py +++ b/project.py @@ -522,13 +522,11 @@ class RepoHook(object): prompt = ('Repo %s run the script:\n' ' %s\n' '\n' - 'Do you want to allow this script to run ' - '(yes/yes-never-ask-again/NO)? ') % (self._GetMustVerb(), - self._script_fullpath) + 'Do you want to allow this script to run') return self._CheckForHookApprovalHelper( 'approvedhash', self._GetHash(), - prompt, + prompt % (self._GetMustVerb(), self._script_fullpath), 'Scripts have changed since %s was allowed.' % (self._hook_type,)) def _ExecuteHook(self, **kwargs):