refresh: fix crash during autoinstall
Controllers have started, but we have decided that no refresh check is needed, so no check_task was started (or assigned). GET /refresh is called, resulting in: DEBUG subiquity.server.server:446 request to /refresh?wait=true crashed Traceback (most recent call last): File "subiquity/server/controllers/refresh.py", line 233, in GET await self.check_task.wait() AttributeError: 'NoneType' object has no attribute 'wait'
This commit is contained in:
parent
ba506e2c01
commit
3e9de290be
|
@ -229,7 +229,7 @@ class RefreshController(SubiquityController):
|
|||
return change
|
||||
|
||||
async def GET(self, wait: bool = False) -> RefreshStatus:
|
||||
if wait:
|
||||
if self.active and wait:
|
||||
await self.check_task.wait()
|
||||
return self.status
|
||||
|
||||
|
|
Loading…
Reference in New Issue