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/analyzer.py

    r524 r527  
    5757        self.mustclose = None 
    5858         
    59     def findExecutable(self, command) : 
    60         """Finds an executable in the PATH and returns True if found else False.""" 
    61         for path in os.environ.get("PATH", "").split(":") : 
    62             fullname = os.path.abspath(os.path.join(os.path.expanduser(path), command)) 
    63             if os.path.isfile(fullname) and os.access(fullname, os.X_OK) : 
    64                 return True 
    65         return False 
    66          
    6759    def getJobSize(self) :     
    6860        """Returns the job's size.""" 
     
    7466                size = pdlhandler.getJobSize() 
    7567            except pdlparser.PDLParserError, msg :     
    76                 raise pdlparser.PDLParserError, "Unknown file format for %s (%s)" % (self.filename, msg) 
     68                raise pdlparser.PDLParserError, "Unsupported file format for %s (%s)" % (self.filename, msg) 
    7769        finally :     
    7870            self.closeFile() 
     
    9890                    dummyfile.close() 
    9991            except pdlparser.PDLParserError, msg :     
    100                 raise pdlparser.PDLParserError, "Unknown file format for %s (%s)" % (self.filename, msg) 
     92                raise pdlparser.PDLParserError, "Unsupported file format for %s (%s)" % (self.filename, msg) 
    10193        finally : 
    10294            self.closeFile()