Skip to content

Commit

Permalink
Merge pull request #1425 from ogayot/fix-try-again-not-waiting
Browse files Browse the repository at this point in the history
snaplist: do not automatically mark configured on failed GET request
  • Loading branch information
ogayot authored Sep 20, 2022
2 parents 5053186 + 83a7aff commit 74cad94
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions subiquity/server/controllers/snaplist.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,11 @@ def make_autoinstall(self):

async def GET(self, wait: bool = False) -> SnapListResponse:
if self.loader.failed or not self.app.base_model.network.has_network:
await self.configured()
return SnapListResponse(status=SnapCheckState.FAILED)
if not self.loader.snap_list_fetched and not wait:
return SnapListResponse(status=SnapCheckState.LOADING)
await self.loader.get_snap_list_task().wait()
if self.loader.failed or not self.app.base_model.network.has_network:
await self.configured()
return SnapListResponse(status=SnapCheckState.FAILED)
return SnapListResponse(
status=SnapCheckState.DONE,
Expand Down

0 comments on commit 74cad94

Please sign in to comment.