Example #1
0
def hasFinished( retcode, filename, output_tag, logfile ):
    """check if a run has finished."""

    E.info( "checking status of job %s with returncode %i" % (filename, retcode) )
    if retcode != 0: 
        try:
            if not output_tag or not re.search( output_tag, IOTools.getLastLine( logfile )):
                return False
        except IOError:
            E.warn( "could not read output_tag from files %s" % (logfile) )
            return False
    return True
Example #2
0
def hasFinished(retcode, filename, output_tag, logfile):
    """check if a run has finished."""

    E.info("checking status of job %s with returncode %i" %
           (filename, retcode))
    if retcode != 0:
        try:
            if not output_tag or not re.search(output_tag,
                                               IOTools.getLastLine(logfile)):
                return False
        except IOError:
            E.warn("could not read output_tag from files %s" % (logfile))
            return False
    return True
Example #3
0
def checkPythonRuns( filename ):
    """returns true if a python run is complete."""
    last_line = IOTools.getLastLine( filename )
    return re.match( "# job finished", last_line )
Example #4
0
def checkPythonRuns(filename):
    """returns true if a python run is complete."""
    last_line = IOTools.getLastLine(filename)
    return re.match("# job finished", last_line)