iterate architecture subsystems
This commit is contained in:
parent
4d1237b6fd
commit
a5c852f2e8
3 changed files with 8 additions and 4 deletions
|
@ -18,7 +18,7 @@ def check():
|
||||||
broken = []
|
broken = []
|
||||||
lo = local.Local()
|
lo = local.Local()
|
||||||
for architecture in lo:
|
for architecture in lo:
|
||||||
for subsystem in architecture.subsystems.values():
|
for subsystem in architecture:
|
||||||
for package in subsystem.catalog.packages.values():
|
for package in subsystem.catalog.packages.values():
|
||||||
packages.append((subsystem, package))
|
packages.append((subsystem, package))
|
||||||
for index, items in enumerate(packages):
|
for index, items in enumerate(packages):
|
||||||
|
|
|
@ -24,9 +24,13 @@ class Architecture:
|
||||||
for f in arguments.subsystems]
|
for f in arguments.subsystems]
|
||||||
if s in subsystems}
|
if s in subsystems}
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
return self.subsystems.values().__iter__()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
lines = [
|
lines = [
|
||||||
f' Name: {self.name}',
|
f' Name: {self.name}',
|
||||||
f' Bits: {self.bits}',
|
f' Bits: {self.bits}',
|
||||||
|
f'Subsystems: {subsystem.name for subsystem in self}',
|
||||||
]
|
]
|
||||||
return os.linesep.join(lines)
|
return os.linesep.join(lines)
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Synchronization:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
for architecture in self.remote:
|
for architecture in self.remote:
|
||||||
for subsystem in architecture.subsystems.values():
|
for subsystem in architecture:
|
||||||
for _, package in sorted(subsystem.catalog.packages.items()):
|
for _, package in sorted(subsystem.catalog.packages.items()):
|
||||||
f = file.File(
|
f = file.File(
|
||||||
os.path.join(self.remote.location, subsystem.path),
|
os.path.join(self.remote.location, subsystem.path),
|
||||||
|
|
Loading…
Reference in a new issue