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

This commit is contained in:
Neal Norwitz 2002-03-13 03:14:26 +00:00
parent e789ea19c1
commit 8a11f5dc7b

View file

@ -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."""