aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/import_export.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-11-24 15:24:58 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-11-24 15:24:58 -0600
commit99d2ac1d83962fb4dc38f01d63d2ad4036226765 (patch)
tree5c8a3a8c6f7ee5ea3662a6c791855864c5784e1a /mediagoblin/gmg_commands/import_export.py
parent30188321531e1b0d3c78166498702bbd8c7dc2bc (diff)
parent6506b1e22c70b55a73ee4cb391aebaf73db79ef9 (diff)
downloadmediagoblin-99d2ac1d83962fb4dc38f01d63d2ad4036226765.tar.lz
mediagoblin-99d2ac1d83962fb4dc38f01d63d2ad4036226765.tar.xz
mediagoblin-99d2ac1d83962fb4dc38f01d63d2ad4036226765.zip
Merge remote-tracking branch 'remotes/jwandborg/master'
Diffstat (limited to 'mediagoblin/gmg_commands/import_export.py')
-rw-r--r--mediagoblin/gmg_commands/import_export.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mediagoblin/gmg_commands/import_export.py b/mediagoblin/gmg_commands/import_export.py
index 30112969..4ec17d47 100644
--- a/mediagoblin/gmg_commands/import_export.py
+++ b/mediagoblin/gmg_commands/import_export.py
@@ -211,10 +211,12 @@ def _export_media(db, args):
_log.info(u'Exporting {0} - {1}'.format(
entry['title'],
name))
-
- mc_file = media_cache.get_file(path, mode='wb')
- mc_file.write(
- mg_globals.public_store.get_file(path, mode='rb').read())
+ try:
+ mc_file = media_cache.get_file(path, mode='wb')
+ mc_file.write(
+ mg_globals.public_store.get_file(path, mode='rb').read())
+ except e:
+ _log.error('Failed: {0}'.format(e))
_log.info('...Media exported')