Changeset 3423

Show
Ignore:
Timestamp:
10/04/08 18:21:43 (16 years ago)
Author:
jerome
Message:

Ensure no incompatible command line options are used.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pkprinters

    r3421 r3423  
    109109                raise PyKotaCommandLineError, _("You must specify printers names on the command line.") 
    110110            names = [u"*"] 
     111 
     112        if options.remove and not options.groups : 
     113            raise PyKotaCommandLineError, _("You must specify printers groups names on the command line") 
     114        elif (((islist or isdelete) and (options.charge  \ 
     115                                        or options.groups \ 
     116                                        or options.remove \ 
     117                                        or options.description \ 
     118                                        or options.skipexisting \ 
     119                                        or options.passthrough \ 
     120                                        or options.nopassthrough \ 
     121                                        or options.maxjobsize))) \ 
     122              or (options.cups and options.list) : 
     123            raise PyKotaCommandLineError, _("Incompatible command line options. Please look at the online help or manual page.") 
    111124 
    112125        if not islist :