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

Code cleaning.

Files:
1 modified

Legend:

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

    r508 r520  
    9292    def isValid(self) :     
    9393        """Returns True if data is PCL3/4/5, else False.""" 
    94         if self.firstblock.startswith("\033E\033") or \ 
    95            (self.firstblock.startswith("\033*rbC") and (not self.lastblock[-3:] == "\f\033@")) or \ 
    96            self.firstblock.startswith("\033*rB\033") or \ 
    97            self.firstblock.startswith("\033%8\033") or \ 
    98            (self.firstblock.find("\033%-12345X") != -1) or \ 
    99            (self.firstblock.find("@PJL ENTER LANGUAGE=PCL\012\015\033") != -1) or \ 
    100            (self.firstblock.startswith(chr(0xcd)+chr(0xca)) and (self.firstblock.find("\033E\033") != -1)) : 
     94        if self.parent.firstblock.startswith("\033E\033") or \ 
     95           (self.parent.firstblock.startswith("\033*rbC") and (not self.parent.lastblock[-3:] == "\f\033@")) or \ 
     96           self.parent.firstblock.startswith("\033*rB\033") or \ 
     97           self.parent.firstblock.startswith("\033%8\033") or \ 
     98           (self.parent.firstblock.find("\033%-12345X") != -1) or \ 
     99           (self.parent.firstblock.find("@PJL ENTER LANGUAGE=PCL\012\015\033") != -1) or \ 
     100           (self.parent.firstblock.startswith(chr(0xcd)+chr(0xca)) and (self.parent.firstblock.find("\033E\033") != -1)) : 
    101101            self.logdebug("DEBUG: Input file is in the PCL3/4/5 format.") 
    102102            return True