Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location.hosts does not exist #296

Open
awsome0305 opened this issue Jul 9, 2021 · 1 comment
Open

location.hosts does not exist #296

awsome0305 opened this issue Jul 9, 2021 · 1 comment

Comments

@awsome0305
Copy link

When I use command "mm2_refresh_mirrorlist_cache",there is an ERROR about "AttributeError: 'Location' object has no attribute 'hosts'"

I found that command use "lib/mirrorlist.py".In the fun "location_cache",the code is like following
def location_cache(session):
cache = {}
for location in mirrormanager2.lib.get_locations(session):
# This does not work - location.hosts does not exist
cache[location.name] = [host.id for host in list(location.hosts)]
return cache

I found there is no "hosts" in the table "location"

Is this a bug?Or some mistake for me?

@adrianreber
Copy link
Member

You are right. Location is from the original mirrormanager implementation and never brought to mirrormanager 2.

Additionally this code isn't used in Fedora anymore at all as we are using the Rust based implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants