summaryrefslogtreecommitdiff
path: root/coverage/codeunit.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-09-06 22:54:35 -0400
committerNed Batchelder <ned@nedbatchelder.com>2012-09-06 22:54:35 -0400
commitca85f635d345ebcdd5fae5e235bd22573aa11e9a (patch)
treefed489d9c86239c0524946a3e4f0f03475f1735b /coverage/codeunit.py
parent86a77dcc3fd38654264bbe26a4bf4166a5823b4e (diff)
downloadpython-coveragepy-ca85f635d345ebcdd5fae5e235bd22573aa11e9a.tar.gz
Where we deal with .pyc files, also deal with .pyo files. Fixes #195.
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)