def tail_lines(file_name):
    _, orig_stat = file_rotated(file_name, None)
    log_file = open(file_name)
    log_file.seek(0, os.SEEK_END)

    while True:
        line = log_file.readline()
        if line:
            yield line
        else:
            time.sleep(0.1)

            # check for rotation and reopen if it did
            rotated, orig_stat = file_rotated(file_name, orig_stat)
            if rotated:
                log.info(file_name % "Log file %s rotated.")
                log_file.close()
                log_file = open(file_name)
dataset/ETHPy150Open zedshaw/python-lust/lust/tail.py/tail_lines/swapped operands of `%`