aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 6828774da6a..cca2589b52c 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -127,7 +127,8 @@ class MachCommands(CommandBase):
print("Extracting Rust docs...")
temp_dir = path.join(hash_dir, "temp_docs")
- shutil.rmtree(temp_dir)
+ if path.isdir(temp_dir):
+ shutil.rmtree(temp_dir)
extract(tgz_file, temp_dir)
shutil.move(path.join(temp_dir, docs_name.split("/")[1], "share", "doc", "rust", "html"), docs_dir)
shutil.rmtree(temp_dir)