Fix FlowHandler show progress (#108586)

This commit is contained in:
Erik Montnemery
2024-01-21 22:40:48 +01:00
committed by GitHub
parent 0566ceca0f
commit e90b42d3d0
2 changed files with 25 additions and 10 deletions

View File

@@ -316,6 +316,9 @@ class FlowManager(abc.ABC):
result: FlowResult | None = None
while not result or result["type"] == FlowResultType.SHOW_PROGRESS_DONE:
result = await self._async_configure(flow_id, user_input)
flow = self._progress.get(flow_id)
if flow and flow.deprecated_show_progress:
break
return result
async def _async_configure(
@@ -540,6 +543,7 @@ class FlowHandler:
__progress_task: asyncio.Task[Any] | None = None
__no_progress_task_reported = False
deprecated_show_progress = False
@property
def source(self) -> str | None:
@@ -710,6 +714,9 @@ class FlowHandler:
report_issue,
)
if progress_task is None:
self.deprecated_show_progress = True
flow_result = FlowResult(
type=FlowResultType.SHOW_PROGRESS,
flow_id=self.flow_id,