def get_build_flavor(settings_module, args):
    """Update the flavor arg based on the settings API"""
    known_flavors = listify(call_user_func(settings_module, 'known_flavors'))
    if args.flavor:
        if args.flavor not in known_flavors:
            raise ValueError('Unknown build flavor: {}'.format(args.flavor))
    else:
        args.flavor = call_user_func(settings_module, 'default_flavor')
        if args.flavor and args.flavor not in known_flavors:
            raise ValueError(
                'Unknown default build flavor: {}'.format(args.flavor))
def get_build_flavor ( settings_module , args ) : known_flavors = listify ( call_user_func ( settings_module , 'known_flavors' ) ) if args . flavor : if args . flavor not in known_flavors : raise ValueError ( 'Unknown build flavor: {}' . format ( args . flavor ) ) else : args . flavor = call_user_func ( settings_module , 'default_flavor' ) if args . flavor and args . flavor not in known_flavors : raise ValueError ( 'Unknown default build flavor: {}' . format ( args . flavor ) )
Update the flavor arg based on the settings API