summaryrefslogtreecommitdiff
path: root/coverage/inorout.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/inorout.py')
-rw-r--r--coverage/inorout.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py
index 0eea62ae..d5e8b226 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -333,6 +333,12 @@ class InOrOut(object):
if self.omit_match and self.omit_match.match(filename):
return "is inside an --omit pattern"
+ # No point tracing a file we can't later write to SQLite.
+ try:
+ filename.encode("utf8")
+ except UnicodeEncodeError:
+ return "non-encodable filename"
+
# No reason found to skip this file.
return None