add docstring explaining _get_system return value

This commit is contained in:
Michael Hudson-Doyle 2024-05-22 12:06:32 +12:00
parent 86282f5721
commit d0366229ec
1 changed files with 7 additions and 0 deletions

View File

@ -340,6 +340,13 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
async def _get_system( async def _get_system(
self, variation_name, label self, variation_name, label
) -> Tuple[Optional[SystemDetails], bool]: ) -> Tuple[Optional[SystemDetails], bool]:
"""Return system information for a given system label.
The return value is a SystemDetails object (if any) and True if
the system was found in the layer that the installer is running
in or False if the source layer needed to be mounted to find
it.
"""
systems = await self.app.snapdapi.v2.systems.GET() systems = await self.app.snapdapi.v2.systems.GET()
labels = {system.label for system in systems.systems} labels = {system.label for system in systems.systems}
if label in labels: if label in labels: