aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/servo/bootstrap_commands.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index ccc971e5b57..90391785698 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -169,10 +169,7 @@ class MachCommands(CommandBase):
@CommandArgument('--keep',
default='1',
help='Keep up to this many most recent dependencies')
- @CommandArgument('--custom-path', '-c',
- action='store_true',
- help='Get Cargo path from CARGO_HOME environment variable')
- def clean_cargo_cache(self, force=False, show_size=False, keep=None, custom_path=False):
+ def clean_cargo_cache(self, force=False, show_size=False, keep=None):
def get_size(path):
if os.path.isfile(path):
return os.path.getsize(path) / (1024 * 1024.0)
@@ -189,7 +186,7 @@ class MachCommands(CommandBase):
'git': {},
}
import toml
- if os.environ.get("CARGO_HOME", "") and custom_path:
+ if os.environ.get("CARGO_HOME", ""):
cargo_dir = os.environ.get("CARGO_HOME")
else:
cargo_dir = path.join(self.context.topdir, ".cargo")
@@ -317,7 +314,10 @@ class MachCommands(CommandBase):
print("Removing `{}`{} package from {}".format(*print_msg))
for crate_path in crate_paths:
if os.path.exists(crate_path):
- delete(crate_path)
+ try:
+ delete(crate_path)
+ except:
+ print("Delete %s failed!" % crate_path)
else:
print("Would remove `{}`{} package from {}".format(*print_msg))