summary refs log tree commit diff
path: root/synapse/logging/context.py
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-03 10:34:44 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-03 10:34:44 +0100
commit11dda97e86579d807528392df7ba3c3efdd03c01 (patch)
tree003e6d55563e78ccca0e9f4a2b1c798231038370 /synapse/logging/context.py
parentMerge branch 'release-v1.39' of github.com:matrix-org/synapse into matrix-org... (diff)
parentFix the `tests-done` github actions step, again (#10512) (diff)
downloadsynapse-11dda97e86579d807528392df7ba3c3efdd03c01.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/logging/context.py')
-rw-r--r--synapse/logging/context.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/logging/context.py b/synapse/logging/context.py

index 18ac507802..02e5ddd2ef 100644 --- a/synapse/logging/context.py +++ b/synapse/logging/context.py
@@ -25,7 +25,7 @@ See doc/log_contexts.rst for details on how this works. import inspect import logging import threading -import types +import typing import warnings from typing import TYPE_CHECKING, Optional, Tuple, TypeVar, Union @@ -745,7 +745,7 @@ def run_in_background(f, *args, **kwargs) -> defer.Deferred: # by synchronous exceptions, so let's turn them into Failures. return defer.fail() - if isinstance(res, types.CoroutineType): + if isinstance(res, typing.Coroutine): res = defer.ensureDeferred(res) # At this point we should have a Deferred, if not then f was a synchronous