Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Allow 'y' as a valid response when confirming identity
Browse files Browse the repository at this point in the history
I prefer having to type only one character rather than all three,
and it seems like other confirmation prompts use the same style.
  • Loading branch information
Nico Sallembien committed Apr 1, 2010
1 parent 9452e4e commit 6d7508b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subcmds/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ def _ConfigureUser(self):

print ''
print 'Your identity is: %s <%s>' % (name, email)
sys.stdout.write('is this correct [yes/no]? ')
if 'yes' == sys.stdin.readline().strip():
sys.stdout.write('is this correct [y/n]? ')
a = sys.stdin.readline().strip()
if a in ('yes', 'y', 't', 'true'):
break

if name != mp.UserName:
Expand Down

0 comments on commit 6d7508b

Please sign in to comment.