aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/wipealldata.py
diff options
context:
space:
mode:
authorBrett Smith <brettcsmith@brettcsmith.org>2012-03-26 14:10:22 -0400
committerBrett Smith <brettcsmith@brettcsmith.org>2012-03-26 14:10:22 -0400
commitc16b8196631e5b1c4cbe618a9af74f5455fe861c (patch)
tree5a94548275636849dd8c771de6b5fe854c0f2098 /mediagoblin/gmg_commands/wipealldata.py
parent28f364bd6d488955952aebe86033e5ba148da2fb (diff)
parent7ccf41818581743c2e16935cd7308ad3d6694149 (diff)
downloadmediagoblin-c16b8196631e5b1c4cbe618a9af74f5455fe861c.tar.lz
mediagoblin-c16b8196631e5b1c4cbe618a9af74f5455fe861c.tar.xz
mediagoblin-c16b8196631e5b1c4cbe618a9af74f5455fe861c.zip
Merge remote branch 'origin/master' into bug261-resized-filenames
This merge involved moving the new FilenameBuilder class to processing/__init__.py, and putting the comment deletion tests back into test_submission.py using the refactored functions.
Diffstat (limited to 'mediagoblin/gmg_commands/wipealldata.py')
-rw-r--r--mediagoblin/gmg_commands/wipealldata.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mediagoblin/gmg_commands/wipealldata.py b/mediagoblin/gmg_commands/wipealldata.py
index 3081bbc0..37217fd1 100644
--- a/mediagoblin/gmg_commands/wipealldata.py
+++ b/mediagoblin/gmg_commands/wipealldata.py
@@ -20,12 +20,16 @@ import sys
import os
import shutil
+from mediagoblin.init import setup_global_and_app_config
+
def wipe_parser_setup(subparser):
pass
def wipe(args):
+ global_config, app_config = setup_global_and_app_config(args.conf_file)
+
print "*** WARNING! ***"
print ""
print "Running this will destroy your mediagoblin database,"
@@ -39,12 +43,12 @@ def wipe(args):
'Are you **SURE** you want to destroy your environment? '
'(if so, type "yes")> ')
- if not drop_it == 'yes':
+ if drop_it != 'yes':
return
print "nixing data in mongodb...."
conn = pymongo.Connection()
- conn.drop_database('mediagoblin')
+ conn.drop_database(app_config["db_name"])
for directory in [os.path.join(os.getcwd(), "user_dev", "media"),
os.path.join(os.getcwd(), "user_dev", "beaker")]: