Changeset 1364

Show
Ignore:
Timestamp:
02/26/04 11:40:40 (21 years ago)
Author:
jalet
Message:

Fixed nested printer groups accounting.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storage.py

    r1363 r1364  
    2222# 
    2323# $Log$ 
     24# Revision 1.45  2004/02/26 10:40:40  jalet 
     25# Fixed nested printer groups accounting. 
     26# 
    2427# Revision 1.44  2004/02/25 19:09:24  jalet 
    2528# Fix for LDAP problem when job price was 0. 
     
    550553        else :         
    551554            printer.Parents = self.getParentPrintersFromBackend(printer) 
     555        for parent in printer.Parents[:] :     
     556            printer.Parents.extend(self.getParentPrinters(parent)) 
     557        self.tool.logdebug("=== %i ===> %s" % (len(printer.Parents), [p.Name for p in printer.Parents])) 
    552558        return printer.Parents 
    553559         
     
    579585         
    580586    def getParentPrintersUserPQuota(self, userpquota) :      
    581         """Returns all user print quota on the printer and its parents.""" 
    582         upquotas = [ ] 
     587        """Returns all user print quota on the printer and all its parents recursively.""" 
     588        upquotas = [] 
    583589        for printer in self.getParentPrinters(userpquota.Printer) : 
    584590            upquotas.append(self.getUserPQuota(userpquota.User, printer)) 
     591        self.tool.logdebug("UPQUOTAS : %i ===> %s" % (len(upquotas), ["%s/%s" % (upq.User.Name, upq.Printer.Name) for upq in upquotas])) 
    585592        return upquotas         
    586593