import concurrent.futures as futures import threading import json import re import shlex import rsgdnd.compare as compare import rsgdnd.utils as utils import argparse import time import os import rsgdnd.p4 as p4 # ======================================= # insert the table and rpf lines into html html = """ {title}
{diff}
""" link_re = re.compile("[nf]") top_re = re.compile("t") diffheader_re = re.compile("") for header in headers_a+headers_b: body_split[1] = body_split[1].replace(header[1], "") out_html = "".join(body_split) # add a some add tbody headers. out_html = out_html.replace("", "") out_html = out_html.replace("", "", 1) # add more useful links. out_html = link_re.sub("🔗", out_html) out_html = top_re.sub("🔗", out_html) out_html = diffheader_re.sub(""+file_out+"" if "open_comparison" in data and data["open_comparison"]: response["links"] = [file_out] else: write_failure(response, data) return True except futures.TimeoutError as error: utils.log(error) response["ok"] = True response["status"] = "failure" response["log"] = "Timed out trying to fulfill request" return True return False def handle_service_start(): pass def handle_service_stop(): pass if __name__ == "__main__": main()