Changeset 3130
- Timestamp:
- 01/09/07 14:33:21 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/autopykota
r3043 r3130 51 51 If the user already exists, actual balance is left 52 52 unmodified. If unset, the default value is 0. 53 54 -e | --email addr Sets the user's e-mail address 55 53 56 """) 54 57 … … 78 81 if not user.Exists : 79 82 self.logdebug("Creating user %s which doesn't exist yet." % username) 80 os.system('pkusers --add --limitby balance --balance "%s" --description "user created from autopykota" "%s"' % (options["initbalance"], username)) 83 if (options["email"] is None) : 84 os.system('pkusers --add --limitby balance --balance "%s" --description "user created from autopykota" "%s"' % (options["initbalance"], username)) 85 else : 86 os.system('pkusers --add --limitby balance --balance "%s" --email "%s" --description "user created from autopykota" "%s"' % (options["initbalance"], options["email"], username)) 87 81 88 user = self.storage.getUserFromBackend(username) 82 89 if user.Exists : … … 109 116 "initbalance" : 0.0 110 117 } 111 short_options = "vhi: "112 long_options = ["help", "version", "initbalance=" ]118 short_options = "vhi:e:" 119 long_options = ["help", "version", "initbalance=", "email="] 113 120 114 121 # Initializes the command line tool … … 123 130 options["version"] = options["v"] or options["version"] 124 131 options["initbalance"] = options["i"] or options["initbalance"] or defaults["initbalance"] 132 options["email"] = options["e"] or options["email"] 125 133 126 134 if options["help"] :