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

« back to all changes in this revision

Viewing changes to bin/ivle-remakeuser

  • Committer: William Grant
  • Date: 2009-01-19 23:29:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: grantw@unimelb.edu.au-20090119232919-4a6goyk6u1u1m58c
ivle.pulldown_subj: Use Storm, and kill ivle.db dependency. This means we use
    unicodes everywhere, so the pulldown module API has changed slightly.

ivle.pulldown_subj.dummy_subj: Return unicodes, not strs.

bin/ivle-enrolallusers: Remove ivle.db dependency, give enrol_user a store,
    and actually use the current year if one is not specified.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import optparse
30
30
import logging
31
31
 
32
 
import ivle.config
33
32
import ivle.database
34
33
import ivle.makeuser
35
34
 
49
48
                          os.path.basename(sys.argv[0])
50
49
    sys.exit(1)
51
50
 
52
 
config = ivle.config.Config()
53
 
store = ivle.database.get_store(config)
 
51
store = ivle.database.get_store()
54
52
 
55
53
if options.all:
56
54
    users = store.find(ivle.database.User).order_by(ivle.database.User.login)
64
62
 
65
63
for user in users:
66
64
    try:
67
 
        ivle.makeuser.make_jail(user, config)
 
65
        ivle.makeuser.make_jail(user)
68
66
    except Exception, message:
69
67
        logging.warning(str(message))
70
68
        continue