raise Exception while True: try: item = q.get(False) if item[1] != 'ERROR': error = False vals[item[0]] = item[1] except Empty: break # If we finally have no non-error answers or we have both SAT and UNSAT if error or ('UNSAT' in vals.values() and True in (v[:4] == 'SAT' for v in vals.values())): raise Exception final_result = vals.popitem()[1] if len(sys.argv) > 5: increment_record(sys.argv[5], final_result.split()[0].lower()) except Exception: final_result = unknownAction(smtdata) if len(sys.argv) > 5: increment_record(sys.argv[5], 'unk') finally: # Stop the running verifiers [subprocess.call(['killall', p], stdout=devnull, stderr=devnull) for (p, j) in jobs if j.is_alive()] [j.terminate() for (p, j) in jobs if j.is_alive()] print(final_result)
try: item = q.get(False) if item[1] != 'ERROR': error = False vals[item[0]] = item[1] except Empty: break # If we finally have no non-error answers or we have both SAT and UNSAT if error or ('UNSAT' in vals.values() and True in (v[:4] == 'SAT' for v in vals.values())): raise Exception final_result = vals.popitem()[1] if len(sys.argv) > 3: increment_record(sys.argv[3], final_result.split()[0].lower()) except Exception: final_result = unknownAction(smtdata) if len(sys.argv) > 3: increment_record(sys.argv[3], 'unk') finally: # Stop the running verifiers [ subprocess.call(['killall', p], stdout=devnull, stderr=devnull) for (p, j) in jobs if j.is_alive() ] [j.terminate() for (p, j) in jobs if j.is_alive()] print(final_result)