mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 1240616 - mach mochitest-run suggests deprecated commands as an alternative r=cmanchester
This commit is contained in:
parent
62704c57f5
commit
5e6d529757
@ -119,7 +119,7 @@ class CommandAction(argparse.Action):
|
||||
if command not in self._mach_registrar.command_handlers:
|
||||
# Make sure we don't suggest any deprecated commands.
|
||||
names = [h.name for h in self._mach_registrar.command_handlers.values()
|
||||
if h.cls.__name__ == 'DeprecatedCommands']
|
||||
if h.cls.__name__ != 'DeprecatedCommands']
|
||||
# We first try to look for a valid command that is very similar to the given command.
|
||||
suggested_commands = difflib.get_close_matches(command, names, cutoff=0.8)
|
||||
# If we find more than one matching command, or no command at all, we give command suggestions instead
|
||||
|
Loading…
x
Reference in New Issue
Block a user