summaryrefslogtreecommitdiff
path: root/lab
diff options
context:
space:
mode:
Diffstat (limited to 'lab')
-rw-r--r--lab/parser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lab/parser.py b/lab/parser.py
index 932480d..1783468 100644
--- a/lab/parser.py
+++ b/lab/parser.py
@@ -9,6 +9,7 @@ from optparse import OptionParser
import disgen
from coverage.misc import CoverageException
+from coverage.files import get_python_source
from coverage.parser import ByteParser, PythonParser
opcode_counts = collections.Counter()
@@ -70,7 +71,8 @@ class ParserMain(object):
"""Process just one file."""
try:
- bp = ByteParser(filename=filename)
+ text = get_python_source(filename)
+ bp = ByteParser(text, filename=filename)
except Exception as err:
print("%s" % (err,))
return