aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/import_export.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-11-18 09:34:09 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-11-18 09:34:09 -0600
commit817066506d846d06d0489dfb42b8200b86f61153 (patch)
tree36578ed7e5b2b205c919fcfb8929c8fc33a79c3f /mediagoblin/gmg_commands/import_export.py
parent76c6c806caec7af20a3fe11c04bb783baacc3934 (diff)
parent3618a9ac5112c657fd095a0f9cbd346921a4e800 (diff)
downloadmediagoblin-817066506d846d06d0489dfb42b8200b86f61153.tar.lz
mediagoblin-817066506d846d06d0489dfb42b8200b86f61153.tar.xz
mediagoblin-817066506d846d06d0489dfb42b8200b86f61153.zip
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Conflicts: mediagoblin/templates/mediagoblin/user_pages/user.html
Diffstat (limited to 'mediagoblin/gmg_commands/import_export.py')
-rw-r--r--mediagoblin/gmg_commands/import_export.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mediagoblin/gmg_commands/import_export.py b/mediagoblin/gmg_commands/import_export.py
index 78d30713..30112969 100644
--- a/mediagoblin/gmg_commands/import_export.py
+++ b/mediagoblin/gmg_commands/import_export.py
@@ -16,7 +16,6 @@
from mediagoblin import mg_globals
from mediagoblin.db.open import setup_connection_and_db_from_config
-from mediagoblin.init.config import read_mediagoblin_config
from mediagoblin.storage.filestorage import BasicFileStorage
from mediagoblin.init import setup_storage, setup_global_and_app_config
@@ -88,7 +87,7 @@ def _import_database(db, args):
args.mongorestore_path,
'-d', db.name,
os.path.join(args._cache_path['database'], db.name)])
-
+
p.wait()
_log.info('...Database imported')
@@ -209,7 +208,7 @@ def _export_media(db, args):
for entry in db.media_entries.find():
for name, path in entry['media_files'].items():
- _log.info('Exporting {0} - {1}'.format(
+ _log.info(u'Exporting {0} - {1}'.format(
entry['title'],
name))
@@ -226,7 +225,8 @@ def env_export(args):
'''
if args.cache_path:
if os.path.exists(args.cache_path):
- _log.error('The cache directory must not exist before you run this script')
+ _log.error('The cache directory must not exist '
+ 'before you run this script')
_log.error('Cache directory: {0}'.format(args.cache_path))
return False
@@ -242,7 +242,7 @@ def env_export(args):
globa_config, app_config = setup_global_and_app_config(args.conf_file)
setup_storage()
-
+
connection, db = setup_connection_and_db_from_config(
app_config, use_pymongo=True)