Changeset 1272
- Timestamp:
- 01/12/04 00:43:31 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1271 r1272 24 24 - 1.16alpha24 : 25 25 26 - Bug wrt number of copies should be fixed. 27 26 28 - Major code refactoring => It is now possible to 27 29 automatically add printers on first print. -
pykota/trunk/pykota/accounter.py
r1271 r1272 22 22 # 23 23 # $Log$ 24 # Revision 1.12 2004/01/11 23:43:31 jalet 25 # Bug wrt number of copies with CUPS should be fixed. 26 # 24 27 # Revision 1.11 2004/01/11 23:22:42 jalet 25 28 # Major code refactoring, it's way cleaner, and now allows automated addition … … 86 89 # computes job's size 87 90 self.JobSize = self.computeJobSize() 91 if ((self.filter.printingsystem == "CUPS") \ 92 and (self.filter.preserveinputfile is not None)) \ 93 or (self.filter.printingsystem != "CUPS") : 94 self.JobSize *= self.filter.copies 88 95 89 96 # get last job information for this printer … … 109 116 110 117 def doAccounting(self, userpquota) : 111 """Delegates the computation of the job size to an external command. 112 113 The command must print the job size on its standard output and exit successfully. 114 """ 118 """Does accounting for current job.""" 115 119 self.beginJob(userpquota) 116 117 # get the job size, which is real job size * number of copies.118 # TODO : Double check with CUPS documentation : this is not always correct119 jobsize = self.getJobSize() * self.filter.copies120 120 121 121 # Is the current user allowed to print at all ? … … 126 126 jobsize = 0 127 127 else : 128 # get the job size 129 jobsize = self.getJobSize() 128 130 userpquota.increasePagesUsage(jobsize) 129 131