diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-14 16:39:01 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-16 15:30:23 -0700 |
commit | 882779f547f4bc20887e8af7d4973d5bbb8bf147 (patch) | |
tree | b6bb469c0bbfa934d363b3f2fb2d45905c610202 | |
parent | 23a3703a1dc9207ac39354721a007920a53894f8 (diff) | |
download | mediagoblin-882779f547f4bc20887e8af7d4973d5bbb8bf147.tar.lz mediagoblin-882779f547f4bc20887e8af7d4973d5bbb8bf147.tar.xz mediagoblin-882779f547f4bc20887e8af7d4973d5bbb8bf147.zip |
only try and delete queue file if it exists
-rw-r--r-- | mediagoblin/processing/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/processing/__init__.py b/mediagoblin/processing/__init__.py index e31b70bb..e2415fd5 100644 --- a/mediagoblin/processing/__init__.py +++ b/mediagoblin/processing/__init__.py @@ -166,9 +166,10 @@ class MediaProcessor(object): # be removed too, but fail if the directory is not empty to be on # the super-safe side. queued_filepath = self.entry.queued_media_file - mgg.queue_store.delete_file(queued_filepath) # rm file - mgg.queue_store.delete_dir(queued_filepath[:-1]) # rm dir - self.entry.queued_media_file = [] + if queued_filepath: + mgg.queue_store.delete_file(queued_filepath) # rm file + mgg.queue_store.delete_dir(queued_filepath[:-1]) # rm dir + self.entry.queued_media_file = [] class ProcessingKeyError(Exception): pass |