with open("good_talos.tab", "w") as output_file: for line in input_file: try: if len(line.strip()) == 0: continue col = line.split("\t") id = int(col[0]) if id < MINIMUM_ID: continue json = col[1] if Math.is_number(json): json = col[2] data = CNV.JSON2object(json).json_blob date = CNV.unix2datetime(data.testrun.date) if id % 1000 == 0: Log.println("loading id " + str(id) + " date: " + CNV.datetime2string(date, "%Y-%m-%d %H:%M:%S")) if date < MINIMUM_DATE: continue if id in all: continue all.add(id) arrays_add(id, "[" + data.test_build.branch + "][" + data.testrun.suite + "]", data) output_file.write(str(id) + "\t" + json) except Exception, e: Log.warning("can not process line:\n\t" + line, e)