summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorminus <minus@mnus.de>2019-11-17 09:36:23 +0100
committerminus <minus@mnus.de>2019-11-19 17:44:47 +0100
commit351664ec071daa04161577c6a1c949ed0f2c3206 (patch)
tree4fdb8e81c50e85c19c29b94d02e28e2d8c42cb2c
parent5f1eada3eae215f0fd489000e97792c892fb7b17 (diff)
downloaddeluge-351664ec071daa04161577c6a1c949ed0f2c3206.tar.gz
deluge-351664ec071daa04161577c6a1c949ed0f2c3206.tar.bz2
deluge-351664ec071daa04161577c6a1c949ed0f2c3206.zip
[Logging] Fix Python 3.8 compatibility
Deluge's logger class extends Python's `logging.Logger`. Since Python 3.8, it takes an additional argument `stacklevel`. The implementation in Deluge does not support that. Work around the problem by ignoring additional arguments.
-rw-r--r--deluge/log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/log.py b/deluge/log.py
index 75e8308b5..0f9877fdb 100644
--- a/deluge/log.py
+++ b/deluge/log.py
@@ -86,7 +86,7 @@ class Logging(LoggingLoggerClass):
def exception(self, msg, *args, **kwargs):
yield LoggingLoggerClass.exception(self, msg, *args, **kwargs)
- def findCaller(self, stack_info=False): # NOQA: N802
+ def findCaller(self, *args, **kwargs): # NOQA: N802
f = logging.currentframe().f_back
rv = '(unknown file)', 0, '(unknown function)'
while hasattr(f, 'f_code'):