'This tries to determine the apt mirror/archive to use (when processing repos)
if the host machine is Debian or Ubuntu.'

def get_repo_mirror_from_apt(self):

    try:
        sources = sourceslist.SourcesList()
        release = debdistro.get_distro()
        release.get_sources(sources)
        mirrors = release.get_server_list()
        for mirror in mirrors:
            if mirror[2]:
                mirror = mirror[1]
                break
    except:
        return False
    return mirror
