(self)
Read a file containing custom mirror URLs  (one URL per line) to add custom mirrors to rank.

        :param file_to_read: The local file's absolute path
        :returns: A set of mirrors read from file
Read a file containing custom mirror URLs  (one URL per line) to add custom mirrors to rank.
Read a file containing custom mirror URLs ( one URL per line ) to add custom mirrors to rank .
def read_custom_mirror_file(self):
        """
        Read a file containing custom mirror URLs  (one URL per line) to add custom mirrors to rank.

        :param file_to_read: The local file's absolute path
        :returns: A set of mirrors read from file
        """
        if self.custom_mirror_file_path is None:
            return {}
        else:
            logger.info("The file path you input is %s", self.custom_mirror_file_path)
            mirrors = set()
            with open(self.custom_mirror_file_path) as f:
                for line in f:
                    if line.strip().startswith(('http://', 'https://', 'ftp://')):
                        mirrors.add(CandidateMirror(mirror_url=line.strip(), updater=self))

            return mirrors
def read_custom_mirror_file ( self ) : if self . custom_mirror_file_path is None : return { } else : logger . info ( "The file path you input is %s" , self . custom_mirror_file_path ) mirrors = set ( ) with open ( self . custom_mirror_file_path ) as f : for line in f : if line . strip ( ) . startswith ( ( 'http://' , 'https://' , 'ftp://' ) ) : mirrors . add ( CandidateMirror ( mirror_url = line . strip ( ) , updater = self ) ) return mirrors