aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/bootstrap_commands.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 481a6f174e1..6660770677b 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -366,14 +366,15 @@ class MachCommands(CommandBase):
elif os.path.isdir(path.join(git_db_dir, d)):
packages["git"][crate_name]["exist"].append(("del", d, ""))
- for d in os.listdir(crates_src_dir):
- crate_name = re.sub(r"\-\d+(\.\d+){1,3}.+", "", d)
- if not packages["crates"].get(crate_name, False):
- packages["crates"][crate_name] = {
- "current": [],
- "exist": [],
- }
- packages["crates"][crate_name]["exist"].append(d)
+ if crates_src_dir:
+ for d in os.listdir(crates_src_dir):
+ crate_name = re.sub(r"\-\d+(\.\d+){1,3}.+", "", d)
+ if not packages["crates"].get(crate_name, False):
+ packages["crates"][crate_name] = {
+ "current": [],
+ "exist": [],
+ }
+ packages["crates"][crate_name]["exist"].append(d)
total_size = 0
for packages_type in ["git", "crates"]: