Browse Source

iterate architecture subsystems

f
Marc Beninca 1 month ago
parent
commit
e56c9e9718
  1. 2
      __main__.py
  2. 8
      architecture.py
  3. 2
      synchronization.py

2
__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):

8
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)

2
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),

Loading…
Cancel
Save