From f716e8bbf1f20e280d5f973664fd3b4fc91686de Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Sat, 6 Dec 2014 17:50:22 -0800 Subject: [PATCH] Fix concatentation error on no args to `./mach rustc` Since default argument to params is None, concatenating it with a list will raise an error. This behaviour prevents `./mach rustc` to be called when system-rust is defined in .servobuild. Currently it will only work when followed by an argument, i.e. `./mach rustc -arg`. Testing this patch: `./mach rustc` should not raise an error. --- python/servo/devenv_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index e031a9579353..95b9f6eb5610 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -48,6 +48,8 @@ def update_cargo(self, params): 'params', default=None, nargs='...', help="Command-line arguments to be passed through to rustc") def rustc(self, params): + if params is None: + params = [] return subprocess.call(["rustc"] + params, env=self.build_env()) @Command('rust-root',