瀏覽代碼

exit when fahrenheit

Thomas Buck 1 年之前
父節點
當前提交
d6db78f116
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      python-test/flow.py

+ 5
- 1
python-test/flow.py 查看文件

@@ -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…
取消
儲存