summary refs log tree commit diff
path: root/synapse/rest/media/v1
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-16 14:57:21 +0100
committerErik Johnston <erik@matrix.org>2016-08-16 14:57:21 +0100
commit109a560905541adb4dbe66fc4c7c6e3825e192f0 (patch)
tree64aa948f9a1674588eb581e59dac5d143242f73b /synapse/rest/media/v1
parentFix up preview URL API. Add tests. (diff)
downloadsynapse-109a560905541adb4dbe66fc4c7c6e3825e192f0.tar.xz
Flake8
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index beafc8e736..4e4100bdec 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -29,14 +29,13 @@ from synapse.http.server import (
 from synapse.util.async import ObservableDeferred
 from synapse.util.stringutils import is_ascii
 
-from copy import deepcopy
-
 import os
 import re
 import fnmatch
 import cgi
 import ujson as json
 import urlparse
+import itertools
 
 import logging
 logger = logging.getLogger(__name__)
@@ -442,8 +441,6 @@ def _iterate_over_text(tree, *tags_to_ignore):
     """Iterate over the tree returning text nodes in a depth first fashion,
     skipping text nodes inside certain tags.
     """
-    import itertools
-
     # This is basically a stack that we extend using itertools.chain.
     # This will either consist of an element to iterate over *or* a string
     # to be returned.