summaryrefslogtreecommitdiff
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-09-26 17:34:54 -0400
committerYury Selivanov <yselivanov@sprymix.com>2014-09-26 17:34:54 -0400
commit081bbf6b28868774c1abca0a8469a517abb9f6cc (patch)
tree5a91ca676029cceeda75c4a73d2afe77696b4301 /Lib/inspect.py
parent2c0a91606105e1606d886c198ea7ed1b195c692f (diff)
downloadcpython-git-081bbf6b28868774c1abca0a8469a517abb9f6cc.tar.gz
inspect: Fix getsource() to support decorated functions.
Issue #1764286. Patch by Claudiu Popa.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 819bb8de2d..ae55347adc 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -817,6 +817,7 @@ def getsourcelines(object):
corresponding to the object and the line number indicates where in the
original source file the first line of code was found. An OSError is
raised if the source code cannot be retrieved."""
+ object = unwrap(object)
lines, lnum = findsource(object)
if ismodule(object): return lines, 0