Show
Ignore:
Timestamp:
04/15/03 15:06:39 (21 years ago)
Author:
jalet
Message:

Allow to add a printer without any user

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r907 r916  
    2323# 
    2424# $Log$ 
     25# Revision 1.35  2003/04/15 13:06:39  jalet 
     26# Allow to add a printer without any user 
     27# 
    2528# Revision 1.34  2003/04/11 16:51:11  jalet 
    2629# Bug fix for edpykota --add with users who already had a quota on the printer. 
     
    238241    def main(self, names, options) : 
    239242        """Edit user or group quotas.""" 
     243        printeradded = 0 
    240244        printers = self.storage.getMatchingPrinters(options["printer"]) 
    241245        if not printers : 
     
    245249                    printerid = self.storage.addPrinter(pname) 
    246250                    printers = [ (printerid, pname) ] 
     251                    printeradded = 1 
    247252                else :     
    248253                    raise PyKotaToolError, _("Invalid printer name %s") % pname 
     
    265270            (softlimit, hardlimit) = (hardlimit, softlimit) 
    266271        if not names :     
    267             if options["add"] : 
     272            if options["add"] and not printeradded : 
    268273                raise PyKotaToolError, _("You have to pass user names on the command line") 
    269274            else :