Changeset 720 for pykota/trunk/bin

Show
Ignore:
Timestamp:
02/06/03 15:49:04 (22 years ago)
Author:
jalet
Message:

edpykota should be ok now

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r719 r720  
    1717# 
    1818# $Log$ 
     19# Revision 1.5  2003/02/06 14:49:04  jalet 
     20# edpykota should be ok now 
     21# 
    1922# Revision 1.4  2003/02/06 14:28:59  jalet 
    2023# edpykota should be ok, minus some typos 
     
    185188         
    186189        # Initializes the command line tool 
    187         tool = EdPyKota(doc=__doc__) 
     190        editor = EdPyKota(doc=__doc__) 
    188191         
    189192        # parse and checks the command line 
    190         (options, args) = tool.parseCommandline(sys.argv[1:], short_options, long_options) 
     193        (options, args) = editor.parseCommandline(sys.argv[1:], short_options, long_options) 
    191194         
    192195        # sets long options 
     
    197200        options["groups"] = options["g"] or options["groups"] or defaults["groups"] 
    198201        options["prototype"] = options["p"] or options["prototype"] 
    199         options["printer"] = options["P"] or options["printer"] 
     202        options["printer"] = options["P"] or options["printer"] or defaults["printer"] 
    200203        options["softlimit"] = options["S"] or options["softlimit"] 
    201204        options["hardlimit"] = options["H"] or options["hardlimit"]  
    202205         
    203206        if options["help"] : 
    204             tool.display_usage_and_quit() 
     207            editor.display_usage_and_quit() 
    205208        elif options["version"] : 
    206             tool.display_version_and_quit() 
     209            editor.display_version_and_quit() 
    207210        elif options["users"] and options["groups"] :     
    208             raise PyKotaToolError, "edpykota: options --users and --groups are incompatible.\n" 
    209         elif (options["softlimit"] or options["hardlimit"]) and optiions["prototype"] :     
    210             raise PyKotaToolError, "edpykota: options --softlimit or --hardlimit and --prototype are incompatible.\n" 
     211            raise PyKotaToolError, "edpykota: options --users and --groups are incompatible." 
     212        elif (options["softlimit"] or options["hardlimit"]) and options["prototype"] :     
     213            raise PyKotaToolError, "edpykota: options --softlimit or --hardlimit and --prototype are incompatible." 
    211214        elif options["groups"] :     
    212             raise PyKotaToolError, "edpykota: options --groups is currently not implemented.\n" 
     215            raise PyKotaToolError, "edpykota: options --groups is currently not implemented." 
    213216        else : 
    214             sys.exit(apply(tool.main, args, options)) 
     217            sys.exit(editor.main(args, options)) 
    215218    except PyKotaToolError, msg :             
    216219        sys.stderr.write("%s\n" % msg)