File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ async def reconnect_hub():
331331
332332 except subprocess .CalledProcessError as e :
333333 print ()
334- print ("A syntax error occurred while parsing your program:" )
334+ print ("mpy-cross failed to compile the program:" )
335335 print (e .stderr .decode ())
336336
337337 except HubPowerButtonPressedError :
@@ -414,17 +414,14 @@ def is_pybricks_usb(dev):
414414 hub ._enable_line_handler = True
415415 await hub .download (script_path )
416416
417- if args .stay_connected :
418- await self .stay_connected_menu (hub , args )
419-
420417 except subprocess .CalledProcessError as e :
421418 print ()
422- print ("A syntax error occurred while parsing your program:" )
419+ print ("mpy-cross failed to compile the program:" )
423420 print (e .stderr .decode ())
424- if args .stay_connected :
425- await self .stay_connected_menu (hub , args )
426421
427422 finally :
423+ if args .stay_connected :
424+ await self .stay_connected_menu (hub , args )
428425 await hub .disconnect ()
429426
430427
You can’t perform that action at this time.
0 commit comments