fix if-chain in _code.source

This commit is contained in:
Ronny Pfannschmidt 2018-03-09 16:50:46 +01:00
parent 2fe56b97c9
commit 543bac925a
1 changed files with 1 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class Source(object):
for part in parts:
if not part:
partlines = []
if isinstance(part, Source):
elif isinstance(part, Source):
partlines = part.lines
elif isinstance(part, (tuple, list)):
partlines = [x.rstrip("\n") for x in part]
@ -239,7 +239,6 @@ def getfslineno(obj):
# helper functions
#
def findsource(obj):
try:
sourcelines, lineno = inspect.findsource(obj)