# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 MediaGoblin contributors. See AUTHORS.
+# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
args._cache_path['media'])
# TODO: Add import of queue files
- queue_cache = BasicFileStorage(
- args._cache_path['queue'])
+ queue_cache = BasicFileStorage(args._cache_path['queue'])
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')
setup_storage()
global_config, app_config = setup_global_and_app_config(args.conf_file)
- connection, db = setup_connection_and_db_from_config(
+ db = setup_connection_and_db_from_config(
app_config)
tf = tarfile.open(
args._cache_path['media'])
# TODO: Add export of queue files
- queue_cache = BasicFileStorage(
- args._cache_path['queue'])
+ queue_cache = BasicFileStorage(args._cache_path['queue'])
for entry in db.MediaEntry.find():
for name, path in entry.media_files.items():
setup_storage()
- connection, db = setup_connection_and_db_from_config(
- app_config)
+ db = setup_connection_and_db_from_config(app_config)
_export_database(db, args)