summaryrefslogtreecommitdiff
path: root/coverage/codeunit.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/codeunit.py')
-rw-r--r--coverage/codeunit.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/codeunit.py b/coverage/codeunit.py
index 1999c50..eb55489 100644
--- a/coverage/codeunit.py
+++ b/coverage/codeunit.py
@@ -52,7 +52,7 @@ class CodeUnit(object):
else:
f = morf
# .pyc files should always refer to a .py instead.
- if f.endswith('.pyc'):
+ if f.endswith('.pyc') or f.endswith('.pyo'):
f = f[:-1]
self.filename = self.file_locator.canonical_filename(f)