diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-07 09:44:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 09:44:48 -0400 |
commit | 4e874ed5932c8d912e5ad9cf7822c216a5bc9266 (patch) | |
tree | e30a0565ff19c9eef6444c3ccc270094af4ef068 /synapse/rest/media/v1 | |
parent | Add health check endpoint (#8048) (diff) | |
download | synapse-4e874ed5932c8d912e5ad9cf7822c216a5bc9266.tar.xz |
Remove unnecessary maybeDeferred calls (#8044)
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py index 4bb454c36f..cd8c246594 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -28,7 +28,6 @@ from urllib import parse as urlparse import attr -from twisted.internet import defer from twisted.internet.error import DNSLookupError from synapse.api.errors import Codes, SynapseError @@ -228,7 +227,7 @@ class PreviewUrlResource(DirectServeJsonResource): else: logger.info("Returning cached response") - og = await make_deferred_yieldable(defer.maybeDeferred(observable.observe)) + og = await make_deferred_yieldable(observable.observe()) respond_with_json_bytes(request, 200, og, send_cors=True) async def _do_preview(self, url: str, user: str, ts: int) -> bytes: |