Fix file deletion

Return 500 in case of exception

Change-Id: Ief08e3012316dc110eaf6fc85d4421683372bc61
This commit is contained in:
Ekaterina Fedorova 2013-11-12 16:15:52 +04:00
parent 1cc4707648
commit 0bd10d27c6

View File

@ -122,9 +122,8 @@ def delete_directory_or_file(data_type, path):
if os.path.isfile(result_path):
try:
os.remove(result_path)
api.update_cache(data_type)
except Exception:
abort(404)
abort(500)
else:
try:
# enable to delete only empty directories