Skip to content

Commit 64fbe2b

Browse files
bugfix from previous commit in purging query cache
1 parent b3c1999 commit 64fbe2b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datajoint/connection.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,10 @@ def set_query_cache(self, query_cache=None):
258258
def purge_query_cache(self):
259259
"""Purges all query cache."""
260260
if (
261-
cache_key in config
262-
and isinstance(config[cache_key], str)
261+
isinstance(config.get(cache_key), str)
263262
and pathlib.Path(config[cache_key]).is_dir()
264263
):
265-
for path in pathlib.Path(config[cache_key].iterdir()):
264+
for path in pathlib.Path(config[cache_key]).iterdir():
266265
if not path.is_dir():
267266
path.unlink()
268267

0 commit comments

Comments
 (0)