diff --git a/subcommand.py b/subcommand.py index f77a8e4ee3..9d468d60c8 100644 --- a/subcommand.py +++ b/subcommand.py @@ -255,7 +255,9 @@ class CommandDispatcher(object): if cmdhelp: # Not a known command. Default to help. self._add_command_usage(parser, cmdhelp) - return cmdhelp(parser, args) + # Don't pass list of arguments as those may not be supported by cmdhelp. + # See: https://crbug.com/1352093 + return cmdhelp(parser, []) # Nothing can be done. return 2 diff --git a/tests/subcommand_test.py b/tests/subcommand_test.py index 06faf6eb56..1b8315a991 100755 --- a/tests/subcommand_test.py +++ b/tests/subcommand_test.py @@ -139,7 +139,7 @@ class SubcommandTest(unittest.TestCase): self._setUpTestCommands() self.assertEqual(0, self.sc.execute(self.parser, ['not-found'])) - self.module.CMDhelp.assert_called_once_with(self.parser, ['not-found']) + self.module.CMDhelp.assert_called_once_with(self.parser, []) self.assertEqual( 'Module documentation\n\n' 'Commands are:\n'