From ba874d67bb3007dc0d0560e6a0c4f8173e327552 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Thu, 27 Apr 2017 17:30:56 -0400 Subject: [PATCH] Avoid searching for old nightlies in missing dirs These directories may be missing (e.g. a first time build), so don't try to look inside them for old nightlies if so. --- python/servo/bootstrap_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 28b5d4fa673..878f01a615e 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -323,6 +323,8 @@ class MachCommands(CommandBase): removing_anything = False for tool in ["rust", "cargo"]: base = path.join(self.context.sharedir, tool) + if not path.isdir(base): + continue for name in os.listdir(base): # We append `-alt` if LLVM assertions aren't enabled, # so use just the commit hash itself.