Closed Bug 965114 Opened 10 years ago Closed 10 years ago

Exception when displaying a menu of options

Categories

(Developer Services :: Mercurial: bzexport, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

Starting with hg 2.7.1, any bzexport command that tried to display a menu of options would instead give:

  File "/home/njn/moz/bzexport/__init__.py", line 154, in choose_value
    return prompt_menu(ui, desc, list(options), message = message)
  File "/home/njn/moz/bzexport/__init__.py", line 132, in prompt_menu
    choice = prompt_manychoice(ui, message, prompts)
  File "/home/njn/moz/bzexport/__init__.py", line 112, in prompt_manychoice
    return ui.promptchoice(message, prompts, len(prompts)-1)
  TypeError: promptchoice() takes at most 3 arguments (4 given)
Looks like 2.7.1 changed the parameters of ui.promptchoice to something uglier, eg (example from the documentation):

  "would you like fries with that (Yn)? $$ &Yes $$ &No"

Rather than try to be compatible across versions, I say just stop trying to use ui.promptchoice entirely.
Attachment #8367098 - Flags: review?(ted)
Attachment #8367098 - Flags: review?(ted) → review+
http://hg.mozilla.org/users/tmielczarek_mozilla.com/bzexport/rev/f1b2724ebc97
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Other Applications → Developer Services
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: