~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to bin/ivle-remakeuser

  • Committer: William Grant
  • Date: 2009-04-28 06:02:41 UTC
  • Revision ID: grantw@unimelb.edu.au-20090428060241-t4gnwl35maukfvfg
Move ivle.conf.mimetypes to ivle.mimetypes, and rename things in it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import os
29
29
import optparse
30
30
import logging
31
 
import traceback
32
31
 
33
32
import ivle.config
34
33
import ivle.database
50
49
                          os.path.basename(sys.argv[0])
51
50
    sys.exit(1)
52
51
 
53
 
config = ivle.config.Config()
54
 
store = ivle.database.get_store(config)
 
52
store = ivle.database.get_store(ivle.config.Config())
55
53
 
56
54
if options.all:
57
55
    users = store.find(ivle.database.User).order_by(ivle.database.User.login)
65
63
 
66
64
for user in users:
67
65
    try:
68
 
        ivle.makeuser.make_jail(user, config)
 
66
        ivle.makeuser.make_jail(user)
69
67
    except Exception, message:
70
 
        logging.error("Failed to recreate jail for %s.\n%s" % 
71
 
                      (user.login, traceback.format_exc()))
 
68
        logging.warning(str(message))
72
69
        continue
73
70
 
74
71
    logging.debug("recreated user %s's jail." % user.login)