Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
e21370ba
Commit
e21370ba
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Correctly reraise exception
parent
85a4d782
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/rest/media/v1/media_storage.py
+4
-2
4 additions, 2 deletions
synapse/rest/media/v1/media_storage.py
with
4 additions
and
2 deletions
synapse/rest/media/v1/media_storage.py
+
4
−
2
View file @
e21370ba
...
...
@@ -24,6 +24,7 @@ import contextlib
import
os
import
logging
import
shutil
import
sys
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -114,12 +115,13 @@ class MediaStorage(object):
try
:
with
open
(
fname
,
"
wb
"
)
as
f
:
yield
f
,
fname
,
finish
except
Exception
as
e
:
except
Exception
:
t
,
v
,
tb
=
sys
.
exc_info
()
try
:
os
.
remove
(
fname
)
except
Exception
:
pass
raise
e
raise
t
,
v
,
tb
if
not
finished_called
:
raise
Exception
(
"
Finished callback not called
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment