mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 03:55:43 +00:00
[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):
|
def exception(self, msg, *args, **kwargs):
|
||||||
yield LoggingLoggerClass.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
|
f = logging.currentframe().f_back
|
||||||
rv = '(unknown file)', 0, '(unknown function)'
|
rv = '(unknown file)', 0, '(unknown function)'
|
||||||
while hasattr(f, 'f_code'):
|
while hasattr(f, 'f_code'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user