aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/devenv_commands.py
diff options
context:
space:
mode:
authorAndreas Tolfsen <ato@mozilla.com>2014-12-06 17:50:22 -0800
committerAndreas Tolfsen <ato@mozilla.com>2014-12-08 17:12:38 +0000
commitf716e8bbf1f20e280d5f973664fd3b4fc91686de (patch)
tree111335e1eaac1ce35dfe965e9b130a9fd4a8df6f /python/servo/devenv_commands.py
parent33836715a8703299b931f9f891ec6524cca160a7 (diff)
downloadservo-f716e8bbf1f20e280d5f973664fd3b4fc91686de.tar.gz
servo-f716e8bbf1f20e280d5f973664fd3b4fc91686de.zip
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.
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r--python/servo/devenv_commands.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index e031a957935..95b9f6eb561 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -48,6 +48,8 @@ class MachCommands(CommandBase):
'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',