Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zagy committed Nov 18, 2024
1 parent 2229db2 commit 6cc569b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/batou/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def unused(self):
del resources[key]
break
for resource_root in list(resources[key]):
if resource_root.host is s.host:
if resource_root.host.name == s.host.name:
del resources[key][resource_root]
if not resources[key]:
del resources[key]
Expand All @@ -148,6 +148,7 @@ def unused(self):

@property
def unsatisfied(self):
# return set(self.strict_subscribers) - set(self.resources)
unsatisfied = set()
for key, subscribers in list(self.subscribers.items()):
if not any(s.strict for s in subscribers):
Expand All @@ -159,7 +160,7 @@ def unsatisfied(self):
if s.host is None:
continue
if not any(
resource_root.host is s.host
resource_root.host.name == s.host.name
for resource_root in self.resources[key]
):
unsatisfied.add(key)
Expand Down

0 comments on commit 6cc569b

Please sign in to comment.