Skip to content

Commit 85280aa

Browse files
committed
Check storage path before caching it
1 parent 940763f commit 85280aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tsdfileapi/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,14 @@ def find_tenant_storage_path(
7676
"""
7777
cache = opts.tenant_storage_cache.copy()
7878
if not cache.get(tenant):
79+
storage_path_ess = _find_ess_dir(tenant, root=root)
80+
if not storage_path_ess:
81+
return None
82+
7983
cache[tenant] = {
8084
"storage_backend": "ess",
8185
"storage_paths": {
82-
"ess": _find_ess_dir(tenant, root=root),
86+
"ess": storage_path_ess,
8387
},
8488
}
8589
opts.tenant_storage_cache = cache.copy()

0 commit comments

Comments
 (0)