From: Joar Wandborg Date: Mon, 2 Apr 2012 13:08:22 +0000 (+0200) Subject: gmg env_import shouldn't crash on unicode ... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c8bee965ad2b7ffe4711fafda7b16b8618944d54;p=mediagoblin.git gmg env_import shouldn't crash on unicode ... characters in media titles --- diff --git a/mediagoblin/gmg_commands/import_export.py b/mediagoblin/gmg_commands/import_export.py index 20cc8fe4..9d79afb4 100644 --- a/mediagoblin/gmg_commands/import_export.py +++ b/mediagoblin/gmg_commands/import_export.py @@ -67,7 +67,7 @@ def _import_media(db, args): for entry in db.MediaEntry.find(): for name, path in entry.media_files.items(): _log.info('Importing: {0} - {1}'.format( - entry.title, + entry.title.encode('ascii', 'replace'), name)) media_file = mg_globals.public_store.get_file(path, mode='wb')