From 5976ffd7f72e529ae94011dee4e55488056e8ad1 Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Fri, 28 Feb 2020 19:50:05 -0800 Subject: [PATCH] Safely delete entry from listing cache --- gcsfs/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcsfs/core.py b/gcsfs/core.py index ab932d70..aa1b7478 100644 --- a/gcsfs/core.py +++ b/gcsfs/core.py @@ -619,7 +619,7 @@ def _maybe_get_cached_listing(self, path): cache_age, self.cache_timeout, ) - del self._listing_cache[path] + self._listing_cache.pop(path, None) return None return listing