Remove checks for Python2-only fields im_func and func_code

This commit is contained in:
Ran Benita 2019-11-15 15:51:44 +02:00
parent c7a83a0f31
commit 04d68fbc9e
1 changed files with 0 additions and 2 deletions

View File

@ -1054,8 +1054,6 @@ def getrawcode(obj, trycall=True):
try:
return obj.__code__
except AttributeError:
obj = getattr(obj, "im_func", obj)
obj = getattr(obj, "func_code", obj)
obj = getattr(obj, "f_code", obj)
obj = getattr(obj, "__code__", obj)
if trycall and not hasattr(obj, "co_firstlineno"):