code/source: remove old IndentationError workaround in getsource()
This has been there since as far as the git history goes (2007), is not covered by any test, and says "Buggy python version consider upgrading". Hopefully everyone have upgraded...
This commit is contained in:
parent
4108174777
commit
c6083ab970
|
@ -308,10 +308,7 @@ def getrawcode(obj, trycall: bool = True):
|
|||
|
||||
def getsource(obj) -> Source:
|
||||
obj = getrawcode(obj)
|
||||
try:
|
||||
strsrc = inspect.getsource(obj)
|
||||
except IndentationError:
|
||||
strsrc = '"Buggy python version consider upgrading, cannot get source"'
|
||||
assert isinstance(strsrc, str)
|
||||
return Source(strsrc)
|
||||
|
||||
|
|
Loading…
Reference in New Issue