def piuparts(chroot, target, analysis):
    cfg = configparser.ConfigParser()
    if cfg.read("/etc/schroot/chroot.d/%s" % (chroot)) == []:
        raise Exception("Shit. No such tarball")

    block = cfg[chroot]

    if "file" not in block:
        raise Exception("Chroot type isn't of tarball")

    location = block['file']
    copy_location = os.path.join("/tmp", os.path.basename(location))

    with schroot(chroot) as chroot:
        chroot.copy(location, copy_location)
        chroot.copy(target, "/tmp")

        print("[     ] Installing...")
        chroot.run(['apt-get', 'install', '-y', 'piuparts'], user='root')
        print("[     ] Piuparts installed.")

        failed = False
        try:
            print("[     ] Running Piuparts..")
            out, err, _ = chroot.run([
                'piuparts',
                '-b', copy_location,
                target % '/tmp/%s',
                '--warn-on-debsums-errors',
                '--pedantic-purge-test',
            ], user='root')
        except SchrootCommandError as e:
            out, err = e.out, e.err
            failed = True

        for x in parse_piuparts(out.splitlines(), target):
            analysis.results.append(x)

        return (analysis, out + err, failed, None, None)
dataset/ETHPy150Open opencollab/debile/debile/slave/runners/piuparts.py/piuparts/swapped operands of `%`