diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2019-05-20 16:49:49 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2019-05-20 16:49:49 +0100 |
commit | 72d363968e865a6518456aed2cfa320f7198eb34 (patch) | |
tree | 7276235202977523f0375b1d0a443eb07140504c | |
parent | c6b6902e9f3e37f5b15184eb509b48b43817a331 (diff) | |
download | deluge-72d363968e865a6518456aed2cfa320f7198eb34.tar.gz deluge-72d363968e865a6518456aed2cfa320f7198eb34.tar.bz2 deluge-72d363968e865a6518456aed2cfa320f7198eb34.zip |
[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.
-rw-r--r-- | deluge/log.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/deluge/log.py b/deluge/log.py index e2e718e40..5c336b77a 100644 --- a/deluge/log.py +++ b/deluge/log.py @@ -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 |