tweak when x-status: confirm gets sent
This commit is contained in:
parent
e7d2959625
commit
9080a56804
|
@ -165,10 +165,9 @@ class SubiquityModel:
|
|||
async def wait_confirmation(self):
|
||||
await self._confirmation.wait()
|
||||
|
||||
def needs_configuration(self, model_name):
|
||||
if model_name is None:
|
||||
return False
|
||||
return model_name not in self._configured_names
|
||||
def is_postinstall_only(self, model_name):
|
||||
return model_name in self._cur_postinstall_model_names and \
|
||||
model_name not in self._cur_install_model_names
|
||||
|
||||
def confirm(self):
|
||||
self._confirmation.set()
|
||||
|
|
|
@ -376,7 +376,7 @@ class SubiquityServer(Application):
|
|||
if not controller.interactive():
|
||||
override_status = 'skip'
|
||||
elif self.state == ApplicationState.NEEDS_CONFIRMATION:
|
||||
if self.base_model.needs_configuration(controller.model_name):
|
||||
if self.base_model.is_postinstall_only(controller.model_name):
|
||||
override_status = 'confirm'
|
||||
if override_status is not None:
|
||||
resp = web.Response(headers={'x-status': override_status})
|
||||
|
|
Loading…
Reference in New Issue