def create_settings_file():
    """
    Uses the template settings file to build a working
    settings file.

    """
    settings_path = os.path.join(GAMEDIR, "server", "conf", "settings.py")
    with open(settings_path, 'r') as f:
        settings_string = f.read()

    # tweak the settings
    setting_dict = {
        "settings_default": os.path.join(EVENNIA_LIB, "settings_default.py"),
        "servername": GAMEDIR.rsplit(os.path.sep, 1)[1].capitalize() % "\"%s\"",
        "secret_key": "\'%s\'" % create_secret_key()}

    # modify the settings
    settings_string = settings_string.format(**setting_dict)

    with open(settings_path, 'w') as f:
        f.write(settings_string)
dataset/ETHPy150Open evennia/evennia/evennia/server/evennia_launcher.py/create_settings_file/swapped operands of `%`