Show
Ignore:
Timestamp:
11/28/07 11:13:33 (16 years ago)
Author:
jerome
Message:

Finally we need to duplicate some datas, since for some file formats (e.g. mstrash)
a preliminary conversion will have to be done (through wvware for example) and we
would need to overwrite original values, which is not desirable.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/pdlparser.py

    r520 r522  
    4343    totiffcommands = None        # Default command to convert to TIFF 
    4444    openmode = "rb"              # Default file opening mode 
    45     def __init__(self, parent) : 
     45    def __init__(self, parent, (firstblock, lastblock)) : 
    4646        """Initialize the generic parser.""" 
    4747        self.parent = parent 
     48        # We need some copies for later inclusion of parsers which 
     49        # would modify the parent's values 
     50        self.filename = parent.filename[:] 
     51        self.firstblock = firstblock[:] 
     52        self.lastblock = lastblock[:] 
    4853        self.infile = None 
    4954        if not self.isValid() : 
     
    5863            # parsing will greatly benefit from this. 
    5964            psyco.bind(self.getJobSize) 
    60         self.infile = open(self.parent.filename, self.openmode) 
    61         # self.logdebug("Opened %s in '%s' mode." % (self.parent.filename, self.openmode)) 
     65        self.infile = open(self.filename, self.openmode) 
     66        # self.logdebug("Opened %s in '%s' mode." % (self.filename, self.openmode)) 
    6267             
    6368    def __del__(self) : 
     
    8489        """    
    8590        if self.totiffcommands : 
    86             infname = self.parent.filename 
     91            infname = self.filename 
    8792            for totiffcommand in self.totiffcommands : 
    8893                error = False