Changeset 2414 for pykota/trunk
- Timestamp:
- 09/01/05 01:16:48 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r2412 r2414 564 564 self.logger.log_message(self.improveMessage(message), level) 565 565 566 def startingBanner(self ) :566 def startingBanner(self, withaccounting) : 567 567 """Retrieves a starting banner for current printer and returns its content.""" 568 568 self.logdebug("Retrieving starting banner...") 569 self.printBanner(self.config.getStartingBanner(self.PrinterName) )569 self.printBanner(self.config.getStartingBanner(self.PrinterName), withaccounting) 570 570 self.logdebug("Starting banner retrieved.") 571 571 572 def endingBanner(self ) :572 def endingBanner(self, withaccounting) : 573 573 """Retrieves an ending banner for current printer and returns its content.""" 574 574 self.logdebug("Retrieving ending banner...") 575 self.printBanner(self.config.getEndingBanner(self.PrinterName) )575 self.printBanner(self.config.getEndingBanner(self.PrinterName), withaccounting) 576 576 self.logdebug("Ending banner retrieved.") 577 577 578 def printBanner(self, bannerfileorcommand ) :578 def printBanner(self, bannerfileorcommand, withaccounting) : 579 579 """Reads a banner or generates one through an external command. 580 580 … … 597 597 self.printInfo(_("Banner generator %s exit code is %s") \ 598 598 % (bannerfileorcommand, str(status))) 599 if withaccounting : 600 if self.accounter.isSoftware : 601 self.BannerSize += 1 # TODO : fix this by passing the banner's content through software accounting 599 602 else : 600 603 self.logdebug("Using %s as the banner." % bannerfileorcommand) … … 607 610 self.runOriginalBackend(fh, isBanner=1) 608 611 fh.close() 612 if withaccounting : 613 if self.accounter.isSoftware : 614 self.BannerSize += 1 # TODO : fix this by passing the banner's content through software accounting 609 615 self.logdebug("Banner printed...") 610 616 … … 627 633 self.UserPQuota.incDenyBannerCounter() # increments the warning counter 628 634 self.exportUserInfo() 629 getattr(self, "%sBanner" % bannertype)() 630 if withaccounting : 631 if self.accounter.isSoftware : 632 self.BannerSize += 1 # TODO : fix this by passing the banner's content through software accounting 635 getattr(self, "%sBanner" % bannertype)(withaccounting) 633 636 self.logdebug("%s banner done." % bannertype.title()) 634 637 -
pykota/trunk/NEWS
r2413 r2414 24 24 - 1.23alpha23 : 25 25 26 - Fixed a problem with banner accounting. 27 26 28 - Introduction of the new 'pkturnkey' command line tool. 27 29