diff --git a/__main__.py b/__main__.py index 47579ad..faea166 100755 --- a/__main__.py +++ b/__main__.py @@ -18,7 +18,7 @@ def check(): broken = [] lo = local.Local() for architecture in lo: - for subsystem in architecture.subsystems.values(): + for subsystem in architecture: for package in subsystem.catalog.packages.values(): packages.append((subsystem, package)) for index, items in enumerate(packages): diff --git a/architecture.py b/architecture.py index 25c74f0..78b9fb2 100644 --- a/architecture.py +++ b/architecture.py @@ -24,9 +24,13 @@ class Architecture: for f in arguments.subsystems] if s in subsystems} + def __iter__(self): + return self.subsystems.values().__iter__() + def __str__(self): lines = [ - f'Name: {self.name}', - f'Bits: {self.bits}', + f' Name: {self.name}', + f' Bits: {self.bits}', + f'Subsystems: {subsystem.name for subsystem in self}', ] return os.linesep.join(lines) diff --git a/synchronization.py b/synchronization.py index 71e8690..9339efc 100644 --- a/synchronization.py +++ b/synchronization.py @@ -16,7 +16,7 @@ class Synchronization: def run(self): for architecture in self.remote: - for subsystem in architecture.subsystems.values(): + for subsystem in architecture: for _, package in sorted(subsystem.catalog.packages.items()): f = file.File( os.path.join(self.remote.location, subsystem.path),