only try and delete queue file if it exists
authorRodney Ewing <ewing.rj@gmail.com>
Wed, 14 Aug 2013 23:39:01 +0000 (16:39 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:23 +0000 (15:30 -0700)
mediagoblin/processing/__init__.py

index e31b70bb3732dd0bdd916dc974518f8566a25d6d..e2415fd550257f1f323234342f266018bf002fd2 100644 (file)
@@ -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