def report_table(suite_name):
    ps = subprocess.Popen(['grep',
                           '-r',
                           'TESTCASE',
                           '/tmp/%s.log' % (suite_name)],
                          stdout=subprocess.PIPE)
    output = ps.communicate()[0]
    #print 'Output inside report_table: ', output
    output = output.splitlines()
    line = 0
    tc_dict = {}
    while line < len(output):
        find1 = re.search('\\b(TESTCASE_GBP_.*)\\b: (.*)', output[line], re.I)
        if find1 is not None:
            line += 1
            if line <= len(output) - 1:
                find2 = re.search(
                    '\\b%s\\b: (.*)' %
                    (find1.group(1)), output[line], re.I)
                if find2 is not None:
                    tc_dict[find1.group(1)] = find2.group(1), find1.group(2)
        line += 1
    #print 'Table Dict == ', tc_dict
    table = prettytable.PrettyTable(["TESTCASE_ID", "RESULTS",
                                     "TESTCASE_HEADER"])
    table.padding_width = 1
    for key, val in tc_dict.iteritems():
        table.add_row(["%s" % (key), "%s" % (val[0]), (val[1]) % "%s"])
    return table
dataset/ETHPy150Open openstack/group-based-policy/gbpservice/tests/contrib/gbpfunctests/libs/utils_libs.py/report_table/swapped operands of `%`