From a51436eba20b2c05f84aa99439b960c65fc48500 Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Mon, 5 May 2014 13:15:24 -0700 Subject: [PATCH] sage-cleaner: fix rm_rf on OS X --- src/bin/sage-cleaner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/sage-cleaner b/src/bin/sage-cleaner index 5729a1a6244..20221ed21e7 100755 --- a/src/bin/sage-cleaner +++ b/src/bin/sage-cleaner @@ -51,7 +51,7 @@ def rm_rf(file_or_path): try: os.unlink(file_or_path) except OSError as e: - if e.errno == errno.EISDIR: + if e.errno == errno.EISDIR or e.errno == errno.EPERM: shutil.rmtree(file_or_path, ignore_errors=True)