diff options
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index d732374d..26cac62f 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -134,9 +134,7 @@ to update the working directory files. | |||
134 | sys.exit(1) | 134 | sys.exit(1) |
135 | 135 | ||
136 | def _Prompt(self, prompt, value): | 136 | def _Prompt(self, prompt, value): |
137 | print('%-10s [%s]: ' % (prompt, value), end='') | 137 | print('%-10s [%s]: ' % (prompt, value), end='', flush=True) |
138 | # TODO: When we require Python 3, use flush=True w/print above. | ||
139 | sys.stdout.flush() | ||
140 | a = sys.stdin.readline().strip() | 138 | a = sys.stdin.readline().strip() |
141 | if a == '': | 139 | if a == '': |
142 | return value | 140 | return value |
@@ -173,9 +171,7 @@ to update the working directory files. | |||
173 | if not opt.quiet: | 171 | if not opt.quiet: |
174 | print() | 172 | print() |
175 | print('Your identity is: %s <%s>' % (name, email)) | 173 | print('Your identity is: %s <%s>' % (name, email)) |
176 | print('is this correct [y/N]? ', end='') | 174 | print('is this correct [y/N]? ', end='', flush=True) |
177 | # TODO: When we require Python 3, use flush=True w/print above. | ||
178 | sys.stdout.flush() | ||
179 | a = sys.stdin.readline().strip().lower() | 175 | a = sys.stdin.readline().strip().lower() |
180 | if a in ('yes', 'y', 't', 'true'): | 176 | if a in ('yes', 'y', 't', 'true'): |
181 | break | 177 | break |
@@ -217,9 +213,7 @@ to update the working directory files. | |||
217 | out.printer(fg='black', attr=c)(' %-6s ', c) | 213 | out.printer(fg='black', attr=c)(' %-6s ', c) |
218 | out.nl() | 214 | out.nl() |
219 | 215 | ||
220 | print('Enable color display in this user account (y/N)? ', end='') | 216 | print('Enable color display in this user account (y/N)? ', end='', flush=True) |
221 | # TODO: When we require Python 3, use flush=True w/print above. | ||
222 | sys.stdout.flush() | ||
223 | a = sys.stdin.readline().strip().lower() | 217 | a = sys.stdin.readline().strip().lower() |
224 | if a in ('y', 'yes', 't', 'true', 'on'): | 218 | if a in ('y', 'yes', 't', 'true', 'on'): |
225 | gc.SetString('color.ui', 'auto') | 219 | gc.SetString('color.ui', 'auto') |