diff options
author | saksham1115 <saksham115@gmail.com> | 2016-06-03 11:55:46 +0000 |
---|---|---|
committer | saksham1115 <saksham115@gmail.com> | 2016-07-19 17:29:08 +0000 |
commit | 19ba17d95066e55afde4db125cf139aae1831650 (patch) | |
tree | c1c64b13ec66a14a34bbd0c7913f47e2c6d68457 /mediagoblin/tools/files.py | |
parent | 74bc86732e016f5926f5654525485afb6411bb8d (diff) | |
download | mediagoblin-19ba17d95066e55afde4db125cf139aae1831650.tar.lz mediagoblin-19ba17d95066e55afde4db125cf139aae1831650.tar.xz mediagoblin-19ba17d95066e55afde4db125cf139aae1831650.zip |
Subtitle built over attachments : working
Diffstat (limited to 'mediagoblin/tools/files.py')
-rw-r--r-- | mediagoblin/tools/files.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mediagoblin/tools/files.py b/mediagoblin/tools/files.py index 2c486ac8..0509a387 100644 --- a/mediagoblin/tools/files.py +++ b/mediagoblin/tools/files.py @@ -41,5 +41,12 @@ def delete_media_files(media): except OSError: no_such_files.append("/".join(attachment['filepath'])) + for subtitle in media.subtitle_files: + try: + mg_globals.public_store.delete_file( + subtitle['filepath']) + except OSError: + no_such_files.append("/".join(subtitle['filepath'])) + if no_such_files: raise OSError(", ".join(no_such_files)) |