summaryrefslogtreecommitdiff
path: root/coverage/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/context.py')
-rw-r--r--coverage/context.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/context.py b/coverage/context.py
index f167de36..c3416208 100644
--- a/coverage/context.py
+++ b/coverage/context.py
@@ -31,7 +31,10 @@ def qualname_from_frame(frame):
if method is None:
return fname
- func = method.__func__
+ func = getattr(method, '__func__', None)
+ if func is None:
+ return fname
+
if hasattr(func, '__qualname__'):
qname = func.__qualname__
else: