client: fix autoinstall crash on endpoint_name

Can trigger a crash today with autoinstall
  `interactive-sections: [storage]`
Not all controllers have an endpoint_name defined.
This commit is contained in:
Dan Bungert 2022-07-13 12:34:09 -06:00
parent 05fdc80c34
commit 44464480a6
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ class SubiquityClient(TuiApplication):
async def _select_initial_screen(self, index): async def _select_initial_screen(self, index):
endpoint_names = [] endpoint_names = []
for c in self.controllers.instances[:index]: for c in self.controllers.instances[:index]:
if c.endpoint_name: if getattr(c, 'endpoint_name', None) is not None:
endpoint_names.append(c.endpoint_name) endpoint_names.append(c.endpoint_name)
if endpoint_names: if endpoint_names:
await self.client.meta.mark_configured.POST(endpoint_names) await self.client.meta.mark_configured.POST(endpoint_names)