Show
Ignore:
Timestamp:
04/08/03 23:10:18 (21 years ago)
Author:
jalet
Message:

Checks --groups option presence instead of --users because --users is the default.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/repykota

    r873 r890  
    2323# 
    2424# $Log$ 
     25# Revision 1.18  2003/04/08 21:10:18  jalet 
     26# Checks --groups option presence instead of --users because --users is the default. 
     27# 
    2528# Revision 1.17  2003/03/29 13:45:27  jalet 
    2629# GPL paragraphs were incorrectly (from memory) copied into the sources. 
     
    147150            print _("Pages grace time: %idays") % self.config.getGraceDelay(printer) 
    148151            total = 0 
    149             if options["users"] : 
     152            if options["groups"] : 
     153                print _("Group            used     soft     hard   grace        total") 
     154                print "------------------------------------------------------------" 
     155                for name in self.storage.getPrinterGroups(printer) : 
     156                    quota = self.storage.getGroupPQuota(name, printer)  
     157                    total += self.printQuota(name, quota) 
     158            else : 
     159                # default is user quota report 
    150160                print _("User             used     soft     hard   grace        total") 
    151161                print "------------------------------------------------------------" 
    152162                for name in self.storage.getPrinterUsers(printer) : 
    153163                    quota = self.storage.getUserPQuota(name, printer) 
    154                     total += self.printQuota(name, quota) 
    155             else : 
    156                 print _("Group            used     soft     hard   grace        total") 
    157                 print "------------------------------------------------------------" 
    158                 for name in self.storage.getPrinterGroups(printer) : 
    159                     quota = self.storage.getGroupPQuota(name, printer)  
    160164                    total += self.printQuota(name, quota) 
    161165            if total :