Skip to content

Commit d8da2b9

Browse files
committed
Keep windows working in the face of bizarre errors
1 parent 56c6213 commit d8da2b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coverage/files.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def actual_path(path):
122122
else:
123123
try:
124124
files = os.listdir(head)
125-
except OSError:
125+
except Exception:
126+
# This will raise OSError, or this bizarre TypeError:
127+
# https://bugs.python.org/issue1776160
126128
files = []
127129
_ACTUAL_PATH_LIST_CACHE[head] = files
128130
normtail = os.path.normcase(tail)

0 commit comments

Comments
 (0)