diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-03-14 13:40:14 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-03-14 13:40:14 -0400 |
commit | 50a3baf54146337172d5efc57933adceb2b2fb78 (patch) | |
tree | 8ca9cee690bcbffd0c29f9b6978490dbda07589b /coverage/pytracer.py | |
parent | de73882e515fcce4bc4f2c62f0a6de42178866a5 (diff) | |
download | python-coveragepy-50a3baf54146337172d5efc57933adceb2b2fb78.tar.gz |
Minimal IronPython support.
IronPython is weird: 2.7.7 has "str is unicode", and unicode.encode produces
unicode! f_lasti is missing, and frame globals are missing.
Diffstat (limited to 'coverage/pytracer.py')
-rw-r--r-- | coverage/pytracer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/pytracer.py b/coverage/pytracer.py index 3cf956f..6dae014 100644 --- a/coverage/pytracer.py +++ b/coverage/pytracer.py @@ -101,7 +101,7 @@ class PyTracer(object): # function calls and re-entering generators. The f_lasti field is # -1 for calls, and a real offset for generators. Use <0 as the # line number for calls, and the real line number for generators. - if frame.f_lasti < 0: + if getattr(frame, 'f_lasti', -1) < 0: self.last_line = -frame.f_code.co_firstlineno else: self.last_line = frame.f_lineno |