From d8da2b9a6cf5c127c9ba9393c716d9dc4dd50cbe Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 9 Sep 2018 07:42:14 -0400 Subject: Keep windows working in the face of bizarre errors --- coverage/files.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'coverage/files.py') 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) -- cgit v1.2.1