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

« back to all changes in this revision

Viewing changes to makeuser.py

  • Committer: mattgiuca
  • Date: 2008-02-05 01:51:26 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:411
Renamed lib/fileservice to lib/fileservice_lib (naming conflict).
Added new app: fileservice. This app replaces the old one that was deleted -
it simply calls fileservice_lib.handle, and that's it (so it functions exactly
the same).

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import conf
33
33
import common.makeuser
34
34
 
35
 
if len(sys.argv) <= 1:
36
 
    print "Usage: python makeuser.py <username>"
 
35
if len(sys.argv) <= 6:
 
36
    print "Usage: python makeuser.py <username> <password> <nick> " \
 
37
        "<fullname> <rolenm> <studentid>"
37
38
    sys.exit()
38
39
 
39
40
username = sys.argv[1]
 
41
password = sys.argv[2]
 
42
nick = sys.argv[3]
 
43
fullname = sys.argv[4]
 
44
rolenm = sys.argv[5]
 
45
studentid = sys.argv[6]
40
46
 
41
47
try:
42
 
    common.makeuser.makeuser(username)
 
48
    common.makeuser.makeuser(username, password, nick, fullname, rolenm,
 
49
        studentid)
43
50
except Exception, message:
44
51
    print "Error: " + str(message)
45
52
    sys.exit(1)
46
53
 
47
 
print "Successfully created user " + username + "."
 
54
print "Successfully created user %s (%s)." % (username, fullname)