We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40e0179 commit 60c09d2Copy full SHA for 60c09d2
plugwise_usb/nodes/circle.py
@@ -506,8 +506,12 @@ async def get_missing_energy_logs(self) -> None:
506
result = await task
507
# When an energy log collection task returns False, stop and cancel the remaining tasks
508
if not result:
509
- for t in tasks[idx + 1 :]:
+ to_cancel = tasks[idx + 1 :]
510
+ for t in to_cancel:
511
t.cancel()
512
+ # Drain cancellations to avoid "Task exception was never retrieved"
513
+ from asyncio import gather as _gather
514
+ await _gather(*to_cancel, return_exceptions=True)
515
break
516
517
if self._cache_enabled:
0 commit comments