def _get_registry(): f = os.path.join(temp_folder(), "aux_file") remotes, refs = load_registry_txt( "conan.io https://server.conan.io True\n" "conan.io2 https://server2.conan.io True\n") reg = dump_registry(remotes, refs, {}) save(f, reg) return RemoteRegistry(f, TestBufferConanOutput())
def _handle_remotes(cache, remote_file): # FIXME: Should we encourage to pass the remotes in json? remotes, _ = load_registry_txt(load(remote_file)) cache.registry.define(remotes)