summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-09-09 07:42:14 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-09-09 07:42:14 -0400
commitd8da2b9a6cf5c127c9ba9393c716d9dc4dd50cbe (patch)
tree32d28e25de1727b5ea25a36f8a96febb91ad50c8 /coverage/files.py
parent56c6213c89dfbabb21de3264ec0e024ada9fe568 (diff)
downloadpython-coveragepy-git-d8da2b9a6cf5c127c9ba9393c716d9dc4dd50cbe.tar.gz
Keep windows working in the face of bizarre errors
Diffstat (limited to 'coverage/files.py')
-rw-r--r--coverage/files.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/files.py b/coverage/files.py
index 5beb518d..b328f653 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -122,7 +122,9 @@ if env.WINDOWS:
else:
try:
files = os.listdir(head)
- except OSError:
+ except Exception:
+ # This will raise OSError, or this bizarre TypeError:
+ # https://bugs.python.org/issue1776160
files = []
_ACTUAL_PATH_LIST_CACHE[head] = files
normtail = os.path.normcase(tail)