Pārlūkot izejas kodu

fix a bug when catching error

chenhaiyang 4 gadi atpakaļ
vecāks
revīzija
351ce65483
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      app/controllers/equipment/fcu/on_ratio.py

+ 1 - 0
app/controllers/equipment/fcu/on_ratio.py

@@ -167,6 +167,7 @@ async def start_on_ratio_mode(device_id: str, target: float, period_time: int):
                 last_on_ratio = 0.0
                 await asyncio.sleep(period_time)
         except (KeyError, IndexError, TypeError):
+            await asyncio.sleep(period_time)
             continue