File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ async def main() -> None:
25
25
f"Set WOKWI_CLI_TOKEN in your environment. You can get it from { GET_TOKEN_URL } ."
26
26
)
27
27
28
- client = WokwiClient (token )
29
- print (f"Wokwi client library version: { client .version } " )
30
-
31
- hello = await client .connect ()
32
- print ("Connected to Wokwi Simulator, server version:" , hello ["version" ])
33
-
34
28
for filename , url in FIRMWARE_FILES .items ():
35
29
if (EXAMPLE_DIR / filename ).exists ():
36
30
continue
@@ -40,6 +34,12 @@ async def main() -> None:
40
34
with open (EXAMPLE_DIR / filename , "wb" ) as f :
41
35
f .write (response .content )
42
36
37
+ client = WokwiClient (token )
38
+ print (f"Wokwi client library version: { client .version } " )
39
+
40
+ hello = await client .connect ()
41
+ print ("Connected to Wokwi Simulator, server version:" , hello ["version" ])
42
+
43
43
# Upload the diagram and firmware files
44
44
await client .upload_file ("diagram.json" , EXAMPLE_DIR / "diagram.json" )
45
45
await client .upload_file ("hello_world.bin" , EXAMPLE_DIR / "hello_world.bin" )
You can’t perform that action at this time.
0 commit comments