summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-14 09:19:39 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-14 09:19:39 +0900
commitfc241240d828d7e8302dc0876608a9d27ae1cbc7 (patch)
tree83936a7c4dde92e5ccffb9d884591f633f421390 /subcmds/init.py
parent9f3406ea4635e0f8cef1d0ec4dbfe6b1554375d6 (diff)
downloadgit-repo-fc241240d828d7e8302dc0876608a9d27ae1cbc7.tar.gz
Convert prompt answers to lower case before checking
When prompting for yes/no answers, convert the answer to lower case before comparing. This makes it easier to catch answers like "Yes", "yes", and "YES" with a comparison only for "yes". Change-Id: I06da8281cec81a7438ebb46ddaf3344d12abe1eb
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 48df9e89..99007d60 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -248,7 +248,7 @@ to update the working directory files.
248 print '' 248 print ''
249 print 'Your identity is: %s <%s>' % (name, email) 249 print 'Your identity is: %s <%s>' % (name, email)
250 sys.stdout.write('is this correct [y/N]? ') 250 sys.stdout.write('is this correct [y/N]? ')
251 a = sys.stdin.readline().strip() 251 a = sys.stdin.readline().strip().lower()
252 if a in ('yes', 'y', 't', 'true'): 252 if a in ('yes', 'y', 't', 'true'):
253 break 253 break
254 254