diff --git a/__main__.py b/__main__.py index ad43dec..47579ad 100755 --- a/__main__.py +++ b/__main__.py @@ -17,7 +17,7 @@ def check(): packages = [] broken = [] lo = local.Local() - for architecture in lo.architectures: + for architecture in lo: for subsystem in architecture.subsystems.values(): for package in subsystem.catalog.packages.values(): packages.append((subsystem, package)) diff --git a/repository.py b/repository.py index 77de2b2..c320d98 100644 --- a/repository.py +++ b/repository.py @@ -10,9 +10,12 @@ class Repository: self.architectures = [architecture.Architecture(self, a) for a in arguments.architectures] + def __iter__(self): + return self.architectures.__iter__() + def __str__(self): lines = [ f' Location: {self.location}', - f'Architectures: {[a.name for a in self.architectures]}', + f'Architectures: {[architecture.name for architecture in self]}', ] return os.linesep.join(lines) diff --git a/synchronization.py b/synchronization.py index 9e28832..71e8690 100644 --- a/synchronization.py +++ b/synchronization.py @@ -15,7 +15,7 @@ class Synchronization: self.threads = arguments.threads def run(self): - for architecture in self.remote.architectures: + for architecture in self.remote: for subsystem in architecture.subsystems.values(): for _, package in sorted(subsystem.catalog.packages.items()): f = file.File(