Switch to unified view

a/scripts/purge_project.py b/scripts/purge_project.py
1
import os
2
import sys
1
import sys
3
import json
4
import logging
2
import logging
5
3
6
from pylons import g
4
from pylons import g
7
5
8
from ming.orm import state, session
6
from ming.orm import session
9
7
10
from pymongo.json_util import default
11
from allura import model as M
8
from allura import model as M
12
9
13
log = logging.getLogger(__name__)
10
log = logging.getLogger(__name__)
14
15
MONGO_HOME=os.environ.get('MONGO_HOME', '/usr')
16
MONGO_DUMP=os.path.join(MONGO_HOME, 'bin/mongodump')
17
MONGO_RESTORE=os.path.join(MONGO_HOME, 'bin/mongorestore')
18
11
19
def main():
12
def main():
20
    if len(sys.argv) != 2:
13
    if len(sys.argv) != 2:
21
        log.error('Usage: %s <shortname>', sys.argv[0])
14
        log.error('Usage: %s <shortname>', sys.argv[0])
22
        return 1
15
        return 1