From c9cca39080ef0cf41598f5bb7a35e1771c13ff73 Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Mon, 5 Jan 2015 08:36:53 -0700 Subject: [PATCH] servo: Merge #4549 - Check for no parameters when invoking cargo (from laumann:master); r=jdm When invoking `./mach cargo` the following error appeared ``` Error running mach: ['cargo'] The error occurred in the implementation of the invoked mach command. This should never occur and is likely a bug in the implementation of that command. Consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: TypeError: can only concatenate list (not "NoneType") to list File "/home/tj/servo/python/servo/devenv_commands.py", line 24, in cargo return subprocess.call(["cargo"] + params, ``` it seems to be that all that's missing is checking whether params is None or not. Source-Repo: https://github.com/servo/servo Source-Revision: 3639c4e9818c5421659827b1da1844a9bbb792be --- servo/python/servo/devenv_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servo/python/servo/devenv_commands.py b/servo/python/servo/devenv_commands.py index 30c8a440750a..76f4a5e0bd37 100644 --- a/servo/python/servo/devenv_commands.py +++ b/servo/python/servo/devenv_commands.py @@ -21,6 +21,8 @@ class MachCommands(CommandBase): 'params', default=None, nargs='...', help="Command-line arguments to be passed through to Cargo") def cargo(self, params): + if not params: + params = [] return subprocess.call(["cargo"] + params, env=self.build_env())