Read repos from configuration file

def _read_repos(conf_file, repos, filename, regex):
    '''
    Read repos from configuration file
    '''
    for line in conf_file:
        line = salt.utils.stringutils.to_unicode(line)
        if not regex.search(line):
            continue
        repo = _create_repo(line, filename)

        # do not store duplicated uri's
        if repo['uri'] not in repos:
            repos[repo['uri']] = [repo]