Changeset 1584 for pykota/trunk/pykota/accounters/hardware.py
- Timestamp:
- 07/01/04 21:56:43 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/hardware.py
r1536 r1584 22 22 # 23 23 # $Log$ 24 # Revision 1.6 2004/07/01 19:56:42 jalet 25 # Better dispatching of error messages 26 # 24 27 # Revision 1.5 2004/06/10 22:42:06 jalet 25 28 # Better messages in logs … … 60 63 # can't get actual page counter, assume printer is off or warming up 61 64 # log the message anyway. 62 self.filter. logger.log_message("%s" % msg, "warn")65 self.filter.printInfo("%s" % msg, "warn") 63 66 counter = None 64 67 self.filter.logdebug("Printer's internal page counter value is : %s" % str(counter)) … … 106 109 if printer is None : 107 110 raise PyKotaAccounterError, _("Unknown printer address in HARDWARE(%s) for printer %s") % (commandline, self.filter.printername) 108 self.filter. logger.log_message(_("Launching HARDWARE(%s)...") % commandline, "info")111 self.filter.printInfo(_("Launching HARDWARE(%s)...") % commandline) 109 112 error = 1 110 113 pagecounter = None … … 114 117 pagecounter = int(line.strip()) 115 118 except ValueError : 116 self.filter. logger.log_message(_("Incorrect answer : %s") % repr(line), "error")119 self.filter.printInfo(_("Incorrect answer : %s") % repr(line), "error") 117 120 except IOError : 118 121 # we were interrupted by a signal, certainely a SIGTERM … … 122 125 except : 123 126 pass # already killed ? 124 self.filter. logger.log_message(_("SIGTERM was sent to hardware accounter %s (pid: %s)") % (commandline, child.pid), "info")127 self.filter.printInfo(_("SIGTERM was sent to hardware accounter %s (pid: %s)") % (commandline, child.pid)) 125 128 else : 126 129 error = 0