summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 6c8b1ddc..1c809ab4 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -294,7 +294,9 @@ to update the working directory files.
294 sys.exit(1) 294 sys.exit(1)
295 295
296 def _Prompt(self, prompt, value): 296 def _Prompt(self, prompt, value):
297 sys.stdout.write('%-10s [%s]: ' % (prompt, value)) 297 print('%-10s [%s]: ' % (prompt, value), end='')
298 # TODO: When we require Python 3, use flush=True w/print above.
299 sys.stdout.flush()
298 a = sys.stdin.readline().strip() 300 a = sys.stdin.readline().strip()
299 if a == '': 301 if a == '':
300 return value 302 return value
@@ -328,7 +330,9 @@ to update the working directory files.
328 330
329 print() 331 print()
330 print('Your identity is: %s <%s>' % (name, email)) 332 print('Your identity is: %s <%s>' % (name, email))
331 sys.stdout.write('is this correct [y/N]? ') 333 print('is this correct [y/N]? ', end='')
334 # TODO: When we require Python 3, use flush=True w/print above.
335 sys.stdout.flush()
332 a = sys.stdin.readline().strip().lower() 336 a = sys.stdin.readline().strip().lower()
333 if a in ('yes', 'y', 't', 'true'): 337 if a in ('yes', 'y', 't', 'true'):
334 break 338 break
@@ -370,7 +374,9 @@ to update the working directory files.
370 out.printer(fg='black', attr=c)(' %-6s ', c) 374 out.printer(fg='black', attr=c)(' %-6s ', c)
371 out.nl() 375 out.nl()
372 376
373 sys.stdout.write('Enable color display in this user account (y/N)? ') 377 print('Enable color display in this user account (y/N)? ', end='')
378 # TODO: When we require Python 3, use flush=True w/print above.
379 sys.stdout.flush()
374 a = sys.stdin.readline().strip().lower() 380 a = sys.stdin.readline().strip().lower()
375 if a in ('y', 'yes', 't', 'true', 'on'): 381 if a in ('y', 'yes', 't', 'true', 'on'):
376 gc.SetString('color.ui', 'auto') 382 gc.SetString('color.ui', 'auto')