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

« back to all changes in this revision

Viewing changes to bin/ivle-makeuser

  • Committer: William Grant
  • Date: 2009-05-26 03:06:53 UTC
  • Revision ID: grantw@unimelb.edu.au-20090526030653-axxawt0o5ws4icbt
Remove ivle.conf usage from ivle.studpath.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    print "Must run %s as root." % os.path.basename(sys.argv[0])
36
36
    sys.exit(1)
37
37
 
 
38
from ivle.config import Config
38
39
from ivle.database import get_store, User
39
40
from ivle.pulldown_subj import enrol_user
40
41
 
41
42
# Requireds and optionals will be used to display the usage message
42
43
# AND do argument processing
43
44
# The names here must correspond to the fields in the database.
44
 
requireds = ["login", "fullname", "rolenm"]
 
45
requireds = ["login", "fullname"]
45
46
optionals = [
46
47
    ('p', 'password', "Cleartext password for this user"),
47
48
    ('n', 'nick', "Display name (defaults to <fullname>)"),
80
81
if 'nick' not in user:
81
82
    user['nick'] = user['fullname']
82
83
 
83
 
store = get_store()
 
84
store = get_store(Config())
84
85
 
85
86
try:
86
87
    # Make the user's database entry