import shutil


def rename_log_file(log_file):
    """
    Rename a .build file to a .log file.

    Koji checks each file's extension during an import operation. We have to
    do this so Koji will accept the log file when we import it.
    """
    assert log_file.endswith('.build')
    new_log_file = log_file[:-6] + '.log'
    # os.rename(log_file, new_log_file)
    # I'm copying instead of renaming, for testing:
    shutil.copy(log_file, new_log_file)
    return new_log_file