summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
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)