From 3dca99f211c91562d603cf52b6e0caaf6cebcdfe Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 17 Apr 2019 10:49:28 +0200 Subject: [PATCH] Disable hard error for now --- certbot/tests/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/certbot/tests/util.py b/certbot/tests/util.py index cd7956657..bb9b8d984 100644 --- a/certbot/tests/util.py +++ b/certbot/tests/util.py @@ -342,7 +342,11 @@ class TempDirTestCase(unittest.TestCase): def handle_rw_files(_, path, __): """Handle read-only files, that will fail to be removed on Windows.""" security.chmod(path, stat.S_IWRITE) - os.remove(path) + try: + os.remove(path) + except (IOError, OSError): + # TODO: remote the try/except once all logic from windows file permissions is merged + pass shutil.rmtree(self.tempdir, onerror=handle_rw_files)