Changeset 3000 for pykota

Show
Ignore:
Timestamp:
08/31/06 23:53:58 (18 years ago)
Author:
jerome
Message:

Ensures that the multiplication by number of copies is done
only once.

Location:
pykota/trunk/pykota
Files:
2 modified

Legend:

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

    r2947 r3000  
    5757        # computes job's size 
    5858        self.JobSize = self.computeJobSize() 
    59         if self.filter.InputFile is not None : 
    60             self.JobSize *= self.filter.Copies 
    6159         
    6260        # get last job information for this printer 
  • pykota/trunk/pykota/accounters/software.py

    r2909 r3000  
    124124        self.filter.logdebug("Software accounter %s said job is %s pages long." % (self.arguments, repr(pagecounter))) 
    125125             
    126         return pagecounter or 0 
     126        pagecounter = pagecounter or 0     
     127        if self.filter.InputFile is not None : 
     128            # when a filename is passed as an argument, the backend  
     129            # must generate the correct number of copies. 
     130            pagecounter *= self.filter.Copies 
     131                         
     132        return pagecounter