changing NoSuchFiles for no_such_files
authorJorge Araya Navarro <jorgean@lavabit.com>
Fri, 6 Jul 2012 04:07:44 +0000 (22:07 -0600)
committerJorge Araya Navarro <jorgean@lavabit.com>
Fri, 6 Jul 2012 04:07:44 +0000 (22:07 -0600)
mediagoblin/tools/files.py

index 31a7a97231fe810d71c504021666f98fbb886a38..2b4ad4e45e473603f763b7d3f4fae536592e74a6 100644 (file)
@@ -36,21 +36,21 @@ def delete_media_files(media):
     Arguments:
      - media: A MediaEntry document
     """
-    noSuchFiles = []
+    no_such_files = []
     for listpath in media.media_files.itervalues():
         try:
             mg_globals.public_store.delete_file(
                 listpath)
         except OSError:
-            noSuchFiles.append(_jointhat(listpath))
+            no_such_files.append(_jointhat(listpath))
 
     for attachment in media.attachment_files:
         try:
             mg_globals.public_store.delete_file(
                 attachment['filepath'])
         except OSError:
-            noSuchFiles.append(_jointhat(attachment))
+            no_such_files.append(_jointhat(attachment))
 
-    if noSuchFiles:
+    if no_such_files:
         # This breaks pep8 as far as I know
         raise OSError, ", ".join(noSuchFiles)