[Logging] Fix line numbers missing on Python 3

The findCaller method returns a 4-element tuple on Python 3 whereas it
was a 3-element tuple on Python 2.
This commit is contained in:
Calum Lind 2019-05-20 16:49:49 +01:00
parent c6b6902e9f
commit 72d363968e

View File

@ -98,7 +98,10 @@ class Logging(LoggingLoggerClass):
):
f = f.f_back
continue
rv = (filename, f.f_lineno, co.co_name)
if common.PY2:
rv = (filename, f.f_lineno, co.co_name)
else:
rv = (filename, f.f_lineno, co.co_name, None)
break
return rv