Przeglądaj źródła

fix negative sleep

Clovis JAQUIN 1 rok temu
rodzic
commit
af676ebc6d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      script/send_sms.py

+ 1 - 1
script/send_sms.py

@@ -68,4 +68,4 @@ if __name__ == "__main__":
         except Exception as e:
             logging.exception("An error as occured : ")
         elapsed_time = time.time() - starting_time
-        time.sleep(180 - elapsed_time)
+        time.sleep(max(180 - elapsed_time, 0))