Skip to content

Commit

Permalink
mach: Avoid python error when there's no cargo cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Aug 2, 2018
1 parent 451c52e commit 458879b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions python/servo/bootstrap_commands.py
Expand Up @@ -366,14 +366,15 @@ def get_size(path):
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"]:
Expand Down

0 comments on commit 458879b

Please sign in to comment.