[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.
This commit is contained in:
parent
5f1eada3ea
commit
351664ec07
|
@ -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'):
|
||||
|
|
Loading…
Reference in New Issue