You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our scandir() function crashes if the directory to scan does not exist, which can happen if e.g. a tempory directory is deleted during collection (as in HypothesisWorks/hypothesis#4200). I therefore propose catching the directory-not-found error and returning [] in this case:
try:
withos.scandir(path) ass:
scanned=list(s)
exceptFileNotFoundError:
return []
# Skip entries with symlink loops and other brokenness, so the caller# doesn't have to deal with it.forentryinscanned:
...