aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/import_export.py
diff options
context:
space:
mode:
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')