Skip to content

Commit 9d6b6dc

Browse files
author
hauntsaninja
committed
allow cache metadata to point to directory
1 parent 63a93f1 commit 9d6b6dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,8 @@ def validate_meta(meta: Optional[CacheMeta], id: str, path: Optional[str],
13031303
st = manager.get_stat(path)
13041304
except OSError:
13051305
return None
1306-
if not stat.S_ISREG(st.st_mode):
1307-
manager.log('Metadata abandoned for {}: file {} does not exist'.format(id, path))
1306+
if not stat.S_ISDIR(st.st_mode) and not stat.S_ISREG(st.st_mode):
1307+
manager.log('Metadata abandoned for {}: file or directory {} does not exist'.format(id, path))
13081308
return None
13091309

13101310
manager.add_stats(validate_stat_time=time.time() - t0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy