Browse Source

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.
Nico Sallembien 16 years ago
parent
commit
6d7508b3d5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      subcmds/init.py

+ 3 - 2
subcmds/init.py

@@ -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]? ')
-      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
         break
 
 
     if name != mp.UserName:
     if name != mp.UserName: