Changeset 411
- Timestamp:
- 09/14/06 13:40:13 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/analyzer.py
r410 r411 63 63 self.openFile() 64 64 try : 65 pdlhandler = self.detectPDLHandler() 66 except pdlparser.PDLParserError, msg : 65 try : 66 pdlhandler = self.detectPDLHandler() 67 size = pdlhandler.getJobSize() 68 except pdlparser.PDLParserError, msg : 69 raise pdlparser.PDLParserError, "Unknown file format for %s (%s)" % (self.filename, msg) 70 finally : 67 71 self.closeFile() 68 raise pdlparser.PDLParserError, "Unknown file format for %s (%s)" % (self.filename, msg)69 else :70 try :71 size = pdlhandler.getJobSize()72 finally :73 self.closeFile()74 72 return size 75 73 … … 83 81 self.openFile() 84 82 try : 85 pdlhandler = self.detectPDLHandler()86 except pdlparser.PDLParserError, msg :87 self.closeFile()88 raise pdlparser.PDLParserError, "Unknown file format for %s (%s)" % (self.filename, msg)89 else :90 83 try : 84 pdlhandler = self.detectPDLHandler() 91 85 tiffname = self.convertToTiffMultiPage24NC(pdlhandler) 92 86 result = inkcoverage.getInkCoverage(tiffname, cspace) … … 95 89 except OSError : 96 90 sys.stderr.write("Problem when trying to remove temporary file %s\n" % tiffname) 97 finally : 98 self.closeFile() 91 except pdlparser.PDLParserError, msg : 92 raise pdlparser.PDLParserError, "Unknown file format for %s (%s)" % (self.filename, msg) 93 finally : 94 self.closeFile() 99 95 return result 100 96