Changeset 1483 for pykota/trunk/pykota/accounters/software.py
- Timestamp:
- 05/18/04 16:49:34 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/software.py
r1475 r1483 22 22 # 23 23 # $Log$ 24 # Revision 1.2 2004/05/18 14:49:23 jalet 25 # Big code changes to completely remove the need for "requester" directives, 26 # jsut use "hardware(... your previous requester directive's content ...)" 27 # 24 28 # Revision 1.1 2004/05/13 13:59:30 jalet 25 29 # Code simplifications … … 45 49 infile = open(self.filter.inputfile, "rb") 46 50 47 # launches externalaccounter51 # launches software accounter 48 52 # TODO : USE tempfile.mkstemp() instead ! Needs some work ! 49 53 infilename = tempfile.mktemp() … … 68 72 # check exit status 69 73 if (os.WIFEXITED(retcode) and not os.WEXITSTATUS(retcode)) or os.stat(errfilename) : 70 # tries to extract the job size from the externalaccounter's74 # tries to extract the job size from the software accounter's 71 75 # standard output 72 76 childoutput = open(outfilename, "r") … … 74 78 pagecount = int(childoutput.readline().strip()) 75 79 except (AttributeError, ValueError) : 76 self.filter.logger.log_message(_("Unable to compute job size with externalaccounter %s") % self.arguments)80 self.filter.logger.log_message(_("Unable to compute job size with accounter %s") % self.arguments) 77 81 pagecount = 0 78 82 childoutput.close() 79 83 else : 80 self.filter.logger.log_message(_("Unable to compute job size with externalaccounter %s") % self.arguments)84 self.filter.logger.log_message(_("Unable to compute job size with accounter %s") % self.arguments) 81 85 pagecount = 0 82 86 os.remove(infilename) … … 86 90 # TODO : temporary files may remain on the filesystem... 87 91 msg = "%s : %s" % (self.arguments, msg) 88 self.filter.logger.log_message(_("Unable to compute job size with externalaccounter %s") % msg)92 self.filter.logger.log_message(_("Unable to compute job size with accounter %s") % msg) 89 93 pagecount = 0 90 94