Changeset 1536 for pykota/trunk/pykota/accounters/hardware.py
- Timestamp:
- 06/11/04 00:42:06 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/hardware.py
r1495 r1536 22 22 # 23 23 # $Log$ 24 # Revision 1.5 2004/06/10 22:42:06 jalet 25 # Better messages in logs 26 # 24 27 # Revision 1.4 2004/05/24 22:45:49 jalet 25 28 # New 'enforcement' directive added … … 103 106 if printer is None : 104 107 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") 105 109 error = 1 106 110 pagecounter = None 107 111 child = popen2.Popen4(commandline) 108 112 try : 109 pagecounter = int(child.fromchild.readline().strip()) 113 line = child.fromchild.readline() 114 pagecounter = int(line.strip()) 110 115 except ValueError : 111 pass116 self.filter.logger.log_message(_("Incorrect answer : %s") % repr(line), "error") 112 117 except IOError : 113 118 # we were interrupted by a signal, certainely a SIGTERM