mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue