Changeset 909
- Timestamp:
- 04/12/03 19:20:14 (22 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pykota
r908 r909 23 23 # 24 24 # $Log$ 25 # Revision 1.21 2003/04/12 17:20:14 jalet 26 # Better formula for HP workaround 27 # 25 28 # Revision 1.20 2003/04/12 16:58:28 jalet 26 29 # The workaround for HP printers was not correct, and there's probably no … … 219 222 # its primary counter is only saved in a 10 increment, so 220 223 # it may be lower than the last page counter saved in the 221 # Quota Storage. We unconditionnally set 5 (five) pages 222 # as the last job's size. This is a mean. For more accurate 223 # accounting, don't switch off your HP printers ! 224 # Quota Storage. 225 # We unconditionnally set the last job's size to 226 # abs(int((10 - abs(lastcounter(snmp) - lastcounter(storage)) / 2)) 227 # For more accurate accounting, don't switch off your HP printers ! 224 228 # explanation at : http://web.mit.edu/source/third/lprng/doc/LPRng-HOWTO-15.html 225 229 kotafilter.logger.log_message(_("Error in page count value %i for user %s on printer %s") % (jobsize, lastusername, kotafilter.printername), "error") 226 jobsize = 5# Workaround for HP printers' feature !230 jobsize = abs(int((10 - abs(jobsize)) / 2)) # Workaround for HP printers' feature ! 227 231 228 232 # update the quota for the previous user on this printer -
pykota/trunk/NEWS
r908 r909 48 48 may be lower than the real number of pages printed. 49 49 See http://web.mit.edu/source/third/lprng/doc/LPRng-HOWTO-15.html 50 We unconditionnally set the last job's page count to five in this 51 case. 50 We unconditionnally set the last job's page count to 51 abs(int((10 - abs(lastcounter(snmp) - lastcounter(storage)) / 2)) 52 in this case. 52 53 For a more accurate accounting, never switch your HP printers 53 54 off.