From 4c72459a05c4912217679ccf131e3758efe3b561 Mon Sep 17 00:00:00 2001 From: Sean Canton <405274+eighteyes@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:00:37 -0700 Subject: [PATCH] Ignore rmtree errors for serverless environments --- contextily/tile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contextily/tile.py b/contextily/tile.py index b9c0b532..14e6ce0f 100644 --- a/contextily/tile.py +++ b/contextily/tile.py @@ -58,7 +58,7 @@ def set_cache_dir(path): def _clear_cache(): - shutil.rmtree(tmpdir) + shutil.rmtree(tmpdir, ignore_errors=True) atexit.register(_clear_cache)