aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/files.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2012-07-06 09:03:08 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2012-07-06 09:03:08 -0500
commit1ec85bb3de52ed67af176b76f0eda29df78c2193 (patch)
tree64a27e2610c3dfa87fbecb463a823c935a0cc5e3 /mediagoblin/tools/files.py
parenta850b1e2a216fe9591cfab56ac56efd6126adb44 (diff)
downloadmediagoblin-1ec85bb3de52ed67af176b76f0eda29df78c2193.tar.lz
mediagoblin-1ec85bb3de52ed67af176b76f0eda29df78c2193.tar.xz
mediagoblin-1ec85bb3de52ed67af176b76f0eda29df78c2193.zip
Removing _jointhat()... not really needed.
Diffstat (limited to 'mediagoblin/tools/files.py')
-rw-r--r--mediagoblin/tools/files.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/mediagoblin/tools/files.py b/mediagoblin/tools/files.py
index 0e8dc1e9..315ff5e0 100644
--- a/mediagoblin/tools/files.py
+++ b/mediagoblin/tools/files.py
@@ -16,18 +16,6 @@
from mediagoblin import mg_globals
-import os
-
-def _jointhat(thing):
- if type(thing) == type(list()) or\
- type(thing) == type(tuple()):
- filepath = ""
- for item in thing:
- filepath = os.path.join(filepath, item)
- return filepath
- else:
- raise TypeError, "expecting a list or tuple, {0} received".format(
- str(type(thing)))
def delete_media_files(media):
"""
@@ -42,14 +30,14 @@ def delete_media_files(media):
mg_globals.public_store.delete_file(
listpath)
except OSError:
- no_such_files.append(_jointhat(listpath))
+ no_such_files.append("/".join(listpath))
for attachment in media.attachment_files:
try:
mg_globals.public_store.delete_file(
attachment['filepath'])
except OSError:
- no_such_files.append(_jointhat(attachment))
+ no_such_files.append("/".join(attachment))
if no_such_files:
# This breaks pep8 as far as I know