summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-02 18:32:42 +0100
committerErik Johnston <erik@matrix.org>2016-08-02 18:32:42 +0100
commitf83f5fbce8dc2a2d05df7c2731d8e698e14d3385 (patch)
tree338e0e292ba2d7ea27d75d6bbf677f75f74dc696 /synapse/rest
parentChange the way we summarize URLs (diff)
downloadsynapse-f83f5fbce8dc2a2d05df7c2731d8e698e14d3385.tar.xz
Make it actually compile
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index ea46b8aa1b..4624b89014 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -344,8 +344,8 @@ class PreviewUrlResource(Resource):
                 # lines)
                 text_nodes = (
                     line.strip()
+                    for el in cloned_tree.iter() if el.text
                     for line in el.text.splitlines()
-                    for el in el.iter() if el.text
                 )
 
                 # Try to get a summary of between 200 and 500 words, respecting