aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/files.py
diff options
context:
space:
mode:
authorJorge Araya Navarro <jorgean@lavabit.com>2012-07-05 22:07:44 -0600
committerJorge Araya Navarro <jorgean@lavabit.com>2012-07-05 22:07:44 -0600
commit6d539afda68c5c3b14b744225b6037ce4ea11423 (patch)
treefb206e722e9b1b7fd77350316a05807e3b4f254f /mediagoblin/tools/files.py
parentfb2fbe2c0a0f6944696e3f1994a94f1be3ac0535 (diff)
downloadmediagoblin-6d539afda68c5c3b14b744225b6037ce4ea11423.tar.lz
mediagoblin-6d539afda68c5c3b14b744225b6037ce4ea11423.tar.xz
mediagoblin-6d539afda68c5c3b14b744225b6037ce4ea11423.zip
changing NoSuchFiles for no_such_files
Diffstat (limited to 'mediagoblin/tools/files.py')
-rw-r--r--mediagoblin/tools/files.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/tools/files.py b/mediagoblin/tools/files.py
index 31a7a972..2b4ad4e4 100644
--- a/mediagoblin/tools/files.py
+++ b/mediagoblin/tools/files.py
@@ -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)