Kaynağa Gözat

exit when fahrenheit

Thomas Buck 1 yıl önce
ebeveyn
işleme
d6db78f116
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5
    1
      python-test/flow.py

+ 5
- 1
python-test/flow.py Dosyayı Görüntüle

@@ -27,7 +27,7 @@ async def sleep(t):
27 27
     print_bar(0, 0, w, "s")
28 28
     for i in range(0, w):
29 29
         await asyncio.sleep(t / w)
30
-        print_bar(i, 0, w, "s")
30
+        print_bar(i + 1, 0, w, "s")
31 31
     print()
32 32
 
33 33
 async def wait_for_temp(client, temp):
@@ -81,6 +81,10 @@ async def main(address):
81 81
     print("Connecting...")
82 82
     async with device as client:
83 83
         try:
84
+            if await get_unit_is_fahrenheit(client):
85
+                print("Imperial American scum is currently not supported :P")
86
+                sys.exit(42)
87
+
84 88
             print("Starting Workflow")
85 89
             await flow(client)
86 90
         except:

Loading…
İptal
Kaydet