Merge pull request #1413 from ogayot/LP#1986674

snaplist: avoid showing snaplist screen on failure
This commit is contained in:
Olivier Gayot 2022-09-12 17:32:41 +02:00 committed by GitHub
commit ddddc4356d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,10 @@
import logging
from typing import List
from subiquitycore.tuicontroller import (
Skip,
)
from subiquity.client.controller import (
SubiquityTuiController,
)
@ -37,7 +41,8 @@ class SnapListController(SubiquityTuiController):
if data.status == SnapCheckState.FAILED:
# If loading snaps failed or network is disabled, skip the screen.
log.debug('snaplist GET failed, mark done')
self.done([])
await self.endpoint.POST([])
raise Skip
return SnapListView(self, data)
def run_answers(self):