Changeset 3046
- Timestamp:
- 10/18/06 08:34:15 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/ink.py
r3042 r3046 72 72 parser = analyzer.PDLAnalyzer(self.filter.DataFile, options) 73 73 (cspace, pages) = parser.getInkCoverage() 74 except pdlparser.PDLParserError, msg : 75 # Here we just log the failure, but 76 # we finally ignore it and return 0 since this 77 # computation is just an indication of what the 78 # job's size MAY be. 79 self.filter.printInfo(_("Unable to precompute the job's size and ink coverage with the generic PDL analyzer : %s") % msg, "warn") 80 else : 74 81 cspacelabels = self.cspaceExpanded[cspace] 75 82 for page in pages : … … 79 86 self.inkUsage.append(colordict) 80 87 jobsize = len(pages) 81 self.filter.logdebug("Ink usage : %s ===> %s" % (cspace, repr(self.inkUsage)))82 except pdlparser.PDLParserError, msg :83 # Here we just log the failure, but84 # we finally ignore it and return 0 since this85 # computation is just an indication of what the86 # job's size MAY be.87 self.filter.printInfo(_("Unable to precompute the job's size with the generic PDL analyzer : %s") % msg, "warn")88 else :89 88 if self.filter.InputFile is not None : 90 89 # when a filename is passed as an argument, the backend 91 90 # must generate the correct number of copies. 92 91 jobsize *= self.filter.Copies 92 self.inkUsage *= self.filter.Copies 93 self.filter.logdebug("Ink usage : %s ===> %s" % (cspace, repr(self.inkUsage))) 93 94 return jobsize