Commit 8a11f5dc authored by Neal Norwitz's avatar Neal Norwitz

SF #515015, raise exception if code not found in findsource()

parent e789ea19
......@@ -406,6 +406,7 @@ def findsource(object):
if pat.match(lines[lnum]): break
lnum = lnum - 1
return lines, lnum
raise IOError, 'could not find code object'
def getcomments(object):
"""Get lines of comments immediately preceding an object's source code."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment