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

« back to all changes in this revision

Viewing changes to bin/ivle-makeuser

  • Committer: William Grant
  • Date: 2009-02-17 00:58:59 UTC
  • mto: (1099.1.143 new-dispatch)
  • mto: This revision was merged to the branch mainline in revision 1100.
  • Revision ID: grantw@unimelb.edu.au-20090217005859-q3m4zrca69x8h9e5
Move serve over to the new framework. It sort of works, except not.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import os
32
32
import getopt
33
33
 
34
 
if os.getuid() != 0:
35
 
    print "Must run %s as root." % os.path.basename(sys.argv[0])
36
 
    sys.exit(1)
37
 
 
38
34
from ivle.database import get_store, User
39
35
from ivle.pulldown_subj import enrol_user
40
36
 
59
55
        print t + (' ' * max(28 - len(t), 2)) + desc
60
56
    sys.exit(1)
61
57
 
 
58
if os.getuid() != 0:
 
59
    print "Must run %s as root." % os.path.basename(sys.argv[0])
 
60
    sys.exit(1)
 
61
 
62
62
shorts = ''.join([o[0] + ":" for o in optionals])
63
63
longs = [o[1] + "=" for o in optionals]
64
64
opts, args = getopt.gnu_getopt(sys.argv[1:], shorts, longs)