Bug 1240616 - mach mochitest-run suggests deprecated commands as an alternative r=cmanchester

This commit is contained in:
Robert Longson 2016-01-19 21:39:16 +00:00
parent 62704c57f5
commit 5e6d529757

View File

@ -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