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

« back to all changes in this revision

Viewing changes to makeuser.py

  • Committer: drtomc
  • Date: 2008-01-30 22:53:00 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:340
Mostly fix the block-of-text to the console problem. The tutorial system should call "block" rather than "chat" to send the block of text.

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) <= 6:
36
 
    print "Usage: python makeuser.py <username> <password> <nick> " \
37
 
        "<fullname> <rolenm> <studentid>"
 
35
if len(sys.argv) <= 1:
 
36
    print "Usage: python makeuser.py <username>"
38
37
    sys.exit()
39
38
 
40
39
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]
46
40
 
47
41
try:
48
 
    common.makeuser.makeuser(username, password, nick, fullname, rolenm,
49
 
        studentid)
 
42
    common.makeuser.makeuser(username)
50
43
except Exception, message:
51
44
    print "Error: " + str(message)
52
45
    sys.exit(1)
53
46
 
54
 
print "Successfully created user %s (%s)." % (username, fullname)
 
47
print "Successfully created user " + username + "."