summaryrefslogtreecommitdiffstats
path: root/deluge/log.py
diff options
context:
space:
mode:
authorChase Sterling <chase.sterling@gmail.com>2022-02-02 00:21:54 -0500
committerCalum Lind <calumlind+deluge@gmail.com>2022-02-06 16:45:37 +0000
commit2fb41341c94fe1d53c2c9d48e74e163c725c5857 (patch)
tree6f4925e552b0802fcdc24875ae01c8b4425eeff9 /deluge/log.py
parentb76f2c0f207ae271fb1533b6f2ec91d2c9d5b92a (diff)
downloaddeluge-2fb41341c94fe1d53c2c9d48e74e163c725c5857.tar.gz
deluge-2fb41341c94fe1d53c2c9d48e74e163c725c5857.tar.bz2
deluge-2fb41341c94fe1d53c2c9d48e74e163c725c5857.zip
[Core] Convert inlineCallbacks to maybe_coroutine
Make logging functions synchronous. They were not calling any async functions, and wrapping them in maybe_coroutine caused reactor to be imported before gtkui could install the gtk reactor. Closes: https://github.com/deluge-torrent/deluge/pull/353
Diffstat (limited to 'deluge/log.py')
-rw-r--r--deluge/log.py24
1 files changed, 8 insertions, 16 deletions
diff --git a/deluge/log.py b/deluge/log.py
index 6ce6c2df6..9ac0e27d5 100644
--- a/deluge/log.py
+++ b/deluge/log.py
@@ -51,39 +51,31 @@ class Logging(LoggingLoggerClass):
)
)
- @defer.inlineCallbacks
def garbage(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.log(self, 1, msg, *args, **kwargs)
+ LoggingLoggerClass.log(self, 1, msg, *args, **kwargs)
- @defer.inlineCallbacks
def trace(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.log(self, 5, msg, *args, **kwargs)
+ LoggingLoggerClass.log(self, 5, msg, *args, **kwargs)
- @defer.inlineCallbacks
def debug(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.debug(self, msg, *args, **kwargs)
+ LoggingLoggerClass.debug(self, msg, *args, **kwargs)
- @defer.inlineCallbacks
def info(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.info(self, msg, *args, **kwargs)
+ LoggingLoggerClass.info(self, msg, *args, **kwargs)
- @defer.inlineCallbacks
def warning(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.warning(self, msg, *args, **kwargs)
+ LoggingLoggerClass.warning(self, msg, *args, **kwargs)
warn = warning
- @defer.inlineCallbacks
def error(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.error(self, msg, *args, **kwargs)
+ LoggingLoggerClass.error(self, msg, *args, **kwargs)
- @defer.inlineCallbacks
def critical(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.critical(self, msg, *args, **kwargs)
+ LoggingLoggerClass.critical(self, msg, *args, **kwargs)
- @defer.inlineCallbacks
def exception(self, msg, *args, **kwargs):
- yield LoggingLoggerClass.exception(self, msg, *args, **kwargs)
+ LoggingLoggerClass.exception(self, msg, *args, **kwargs)
def findCaller(self, *args, **kwargs): # NOQA: N802
f = logging.currentframe().f_back