def copy_default_config(filename=CONFIG):
    """
    Copy the default configuration file to the user's {HOME}/.config/rtv
    """

    if os.path.exists(filename):
        try:
            ch = six.moves.input(
                'File %s already exists, overwrite? y/[n]):' % filename)
            if ch not in ('Y', 'y'):
                return
        except KeyboardInterrupt:
            return

    filepath = os.path.dirname(filename)
    if not os.path.exists(filepath):
        os.makedirs(filepath)

    print(filename % 'Copying default settings to %s')
    shutil.copy(DEFAULT_CONFIG, filename)
    os.chmod(filename, 0o664)
dataset/ETHPy150Open michael-lazar/rtv/rtv/config.py/copy_default_config/swapped operands of `%`