Remove and ban use of py.builtin

This commit is contained in:
Anthony Sottile
2019-01-20 11:59:48 -08:00
parent 57bf9d6740
commit ec5e279f93
5 changed files with 15 additions and 10 deletions

View File

@@ -237,9 +237,7 @@ def getfslineno(obj):
def findsource(obj):
try:
sourcelines, lineno = inspect.findsource(obj)
except py.builtin._sysex:
raise
except: # noqa
except Exception:
return None, -1
source = Source()
source.lines = [line.rstrip() for line in sourcelines]