Exemplo n.º 1
0
def find_cluster_summary(txt):
    "Find and return the cluster summary record if it exists"

    b = txt.find("[cluster-summary")
    if b < 0:
        # Older seqexec used this name
        b = txt.find("[seqexec-summary")
    if b >= 0:
        e = txt.find("]", b)
        if e < 0:
            raise JobFailed("Invalid cluster-summary record")

        return RecordParser(txt[b:e + 1]).parse()

    # If we found a cluster-task, but no cluster-summary, then there is a problem
    b = txt.find("[cluster-task")
    if b >= 0:
        raise JobFailed("cluster-summary is missing")

    return None
Exemplo n.º 2
0
 def parse(self, string):
     parser = RecordParser(string)
     return parser.parse()
Exemplo n.º 3
0
 def parse(self, string):
     parser = RecordParser(string)
     return parser.parse()