Allow 'y' as a valid response when confirming identity

I prefer having to type only one character rather than all three,
and it seems like other confirmation prompts use the same style.
This commit is contained in:
Nico Sallembien 2010-04-01 11:03:53 -07:00
parent 9452e4ec09
commit 6d7508b3d5

View File

@ -167,8 +167,9 @@ to update the working directory files.
print '' print ''
print 'Your identity is: %s <%s>' % (name, email) print 'Your identity is: %s <%s>' % (name, email)
sys.stdout.write('is this correct [yes/no]? ') sys.stdout.write('is this correct [y/n]? ')
if 'yes' == sys.stdin.readline().strip(): a = sys.stdin.readline().strip()
if a in ('yes', 'y', 't', 'true'):
break break
if name != mp.UserName: if name != mp.UserName: