summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-09 23:53:40 +0100
committerGitHub <noreply@github.com>2018-04-09 23:53:40 +0100
commitc508b2f2f00d68220437aece8fd0a3ca944184da (patch)
tree51264044344c4d52e97b4e6549918af7950cb276 /synapse/rest
parentMerge pull request #2938 from dklug/develop (diff)
parentReplace old-style raise with six.reraise (diff)
downloadsynapse-c508b2f2f00d68220437aece8fd0a3ca944184da.tar.xz
Merge pull request #3073 from NotAFile/use-six-reraise
Replace old-style raise with six.reraise
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/media/v1/media_storage.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/media_storage.py b/synapse/rest/media/v1/media_storage.py
index 83471b3173..7f263db239 100644
--- a/synapse/rest/media/v1/media_storage.py
+++ b/synapse/rest/media/v1/media_storage.py
@@ -16,6 +16,8 @@
 from twisted.internet import defer, threads
 from twisted.protocols.basic import FileSender
 
+import six
+
 from ._base import Responder
 
 from synapse.util.file_consumer import BackgroundFileConsumer
@@ -119,7 +121,7 @@ class MediaStorage(object):
                 os.remove(fname)
             except Exception:
                 pass
-            raise t, v, tb
+            six.reraise(t, v, tb)
 
         if not finished_called:
             raise Exception("Finished callback not called")