# Path: pacman_mirrors/functions/defaultFn.py
# def load_config_mirror_pool(self):
# def load_default_mirror_pool(self):
# def seed_mirrors(self, file, status=False):
# def sort_mirror_countries(self):
# 
# Path: pacman_mirrors/functions/fileFn.py
# def check_existance_of(filename, folder=False):
# def create_dir(foldername):
# def delete_file(filename):
# def return_mirror_filename(config):
# def write_mirror_list(config, servers, custom=False,
#                       quiet=False, interactive=False):
# def read_mirror_file(filename):
# def write_mirrorlist_header(handle, custom=False):
# def write_mirrorlist_entry(handle, mirror):
# 
# Path: pacman_mirrors/functions/jsonFn.py
# def json_dump_file(data, filename):
# def read_json_file(filename, dictionary=True):
# def write_json_file(data, filename, dictionary=False):
# 
# Path: pacman_mirrors/functions/validFn.py
# def custom_config_is_valid():
# def country_list_is_valid(onlycountry, countrylist):


from pacman_mirrors.functions import defaultFn
from pacman_mirrors.functions import fileFn
from pacman_mirrors.functions import jsonFn
from pacman_mirrors.functions import validFn
#!/usr/bin/env python
#
# This file is part of pacman-mirrors.
#
# pacman-mirrors is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pacman-mirrors is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors.  If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <echo ZmhAbWFuamFyby5vcmcK | base64 -d>

"""Pacman-Mirrors Custom Pool/Mirror Functions"""



def apply_status_to_custom_mirror_pool(config, custom_pool):
    """
    Apply the current mirror status to the custom mirror file
    :param config: config dictionary
    :param custom_pool: the custom mirror pool
    :return: custom mirror pool with status applied
    """

# Path: pacman_mirrors/functions/defaultFn.py
# def load_config_mirror_pool(self):
# def load_default_mirror_pool(self):
# def seed_mirrors(self, file, status=False):
# def sort_mirror_countries(self):
# 
# Path: pacman_mirrors/functions/fileFn.py
# def check_existance_of(filename, folder=False):
# def create_dir(foldername):
# def delete_file(filename):
# def return_mirror_filename(config):
# def write_mirror_list(config, servers, custom=False,
#                       quiet=False, interactive=False):
# def read_mirror_file(filename):
# def write_mirrorlist_header(handle, custom=False):
# def write_mirrorlist_entry(handle, mirror):
# 
# Path: pacman_mirrors/functions/jsonFn.py
# def json_dump_file(data, filename):
# def read_json_file(filename, dictionary=True):
# def write_json_file(data, filename, dictionary=False):
# 
# Path: pacman_mirrors/functions/validFn.py
# def custom_config_is_valid():
# def country_list_is_valid(onlycountry, countrylist):


# Path: pacman_mirrors/functions/customFn.py
from pacman_mirrors.functions import defaultFn
from pacman_mirrors.functions import fileFn
from pacman_mirrors.functions import jsonFn
from pacman_mirrors.functions import validFn

#!/usr/bin/env python
#
# This file is part of pacman-mirrors.
#
# pacman-mirrors is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pacman-mirrors is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors.  If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <echo ZmhAbWFuamFyby5vcmcK | base64 -d>

"""Pacman-Mirrors Custom Pool/Mirror Functions"""



def apply_status_to_custom_mirror_pool(config, custom_pool):
    """
    Apply the current mirror status to the custom mirror file
    :param config: config dictionary
    :param custom_pool: the custom mirror pool
    :return: custom mirror pool with status applied
    """

    status_list = tuple(jsonFn.read_json_file(config["status_file"], dictionary=False))