Show
Ignore:
Timestamp:
11/28/07 18:28:30 (17 years ago)
Author:
jerome
Message:

Now the presence of executable dependencies is tested at runtime.

Files:
1 modified

Legend:

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

    r525 r527  
    3232    """A parser for that MS crap thing.""" 
    3333    totiffcommands = [ 'xvfb-run -a abiword --import-extension=.doc --print="| gs -sDEVICE=tiff24nc -dPARANOIDSAFER -dNOPAUSE -dBATCH -dQUIET -r\"%(dpi)i\" -sOutputFile=\"%(outfname)s\" -" "%(infname)s"' ] 
     34    required = [ "xvfb-run", "xauth", "abiword", "gs" ] 
    3435    def isValid(self) :     
    3536        """Returns True if data is MS crap, else False. 
     
    4647           or self.firstblock[2112:].startswith("MSWordDoc") : 
    4748            self.logdebug("DEBUG: Input file seems to be in a Microsoft shitty file format.") 
    48             return True 
     49            # Here we do the missing test because all commands will be needed even in page counting mode 
     50            if self.isMissing(self.required) : 
     51                return False 
     52            else :     
     53                return True 
    4954        else :     
    5055            return False