def parseRowSpec(spec, globalJobs): jobs = Row() for rowjob in spec: if rowjob.tag == 'board': jobs.addjob(parseJobSpec(rowjob, globalJobs)) elif rowjob.tag == 'col': jobs.addjob(parseColSpec(rowjob, globalJobs)) else: raise RuntimeError("Unexpected element '{:s}' encountered while parsing jobs file".format(rowjob.tag)) return jobs
def parseRowSpec(spec, globalJobs): jobs = Row() for rowjob in spec: if rowjob.tag == 'board': jobs.addjob(parseJobSpec(rowjob, globalJobs)) elif rowjob.tag == 'col': jobs.addjob(parseColSpec(rowjob, globalJobs)) else: raise RuntimeError( "Unexpected element '{:s}' encountered while parsing jobs file" .format(rowjob.tag)) return jobs
def parseRowSpec(spec, data): jobs = Row() for rowjob in spec: if rowjob[0] in ('ts','ws','comment'): continue assert rowjob[0] == 'rowjob' job = rowjob[3][0] if job[0] in ('commentline','nullline'): continue assert job[0] in ('jobspec','colspec') if job[0] == 'jobspec': jobs.addjob(parseJobSpec(job[3],data)) else: jobs.addjob(parseColSpec(job[3],data)) return jobs
def parseRowSpec(spec, data): jobs = Row() for rowjob in spec: if rowjob[0] in ('ts', 'ws', 'comment'): continue assert rowjob[0] == 'rowjob' job = rowjob[3][0] if job[0] in ('commentline', 'nullline'): continue assert job[0] in ('jobspec', 'colspec') if job[0] == 'jobspec': jobs.addjob(parseJobSpec(job[3], data)) else: jobs.addjob(parseColSpec(job[3], data)) return jobs
def parseRowSpec(spec, data): jobs = Row() for rowjob in spec: if rowjob[0] in ("ts", "ws", "comment"): continue assert rowjob[0] == "rowjob" job = rowjob[3][0] if job[0] in ("commentline", "nullline"): continue assert job[0] in ("jobspec", "colspec") if job[0] == "jobspec": jobs.addjob(parseJobSpec(job[3], data)) else: jobs.addjob(parseColSpec(job[3], data)) return jobs