Skip to content
Snippets Groups Projects
Commit 9ec9dd8d1b24 authored by Matt Mackall's avatar Matt Mackall
Browse files

patchbomb: drop loop in prompt

There are no longer any prompts that insist on being answered, so the
loop is no longer needed, nor is most of the other logic.
parent 3a55cee825ba
No related branches found
No related tags found
No related merge requests found
......@@ -59,17 +59,7 @@
def prompt(ui, prompt, default=None, rest=':'):
if default:
prompt += ' [%s]' % default
prompt += rest
while True:
result = ui.prompt(prompt, default=default)
if not ui.interactive():
return result
if result is not None:
return result
elif default is not None:
return default
else:
ui.warn(_('Please enter a valid value.\n'))
return ui.prompt(prompt + rest, default)
def introwanted(opts, number):
'''is an introductory message apparently wanted?'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment