%(name)s [OPTIONS] USER_ID FIELD VALUE Where OPTIONS may be one or more of: -c CONF_FILE Use CONF_FILE as server configuration -d DB_FILE Use DB_FILE as user data base file -f Force operations to continue past errors -h Show this help -v Verbose output """ % { 'name': name } # ## Main ### if '__main__' == __name__: (args, app_dir, db_path) = init_user_adm() conf_path = None force = False verbose = False user_id = None user_dict = {} opt_args = 'c:d:fhv' try: (opts, args) = getopt.getopt(args, opt_args) except getopt.GetoptError, err: print 'Error: ', err.msg usage() sys.exit(1) for (opt, val) in opts: if opt == '-c':
or %(name)s [OPTIONS] -i CERT_DN Where OPTIONS may be one or more of: -c CONF_FILE Use CONF_FILE as server configuration -d DB_FILE Use DB_FILE as user data base file -f Force operations to continue past errors -h Show this help -i CERT_DN Use CERT_DN as user ID no matter what other fields suggest -r Renew user account with existing values -u USER_FILE Read user information from pickle file -v Verbose output """ % {'name': name, 'cert_warn': cert_warn} if '__main__' == __name__: (args, app_dir, db_path) = init_user_adm() conf_path = None force = False verbose = False ask_renew = True default_renew = False user_file = None user_id = None user_dict = {} opt_args = 'c:d:fhi:ru:v' try: (opts, args) = getopt.getopt(args, opt_args) except getopt.GetoptError, err: print 'Error: ', err.msg usage() sys.exit(1)