Skip to content

Commit 0633bfd

Browse files
committed
change uses of the exit function to return instead when possible
1 parent 745a588 commit 0633bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pybricksdev/cli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def is_pybricks_usb(dev):
237237
await hub.download(script_path)
238238

239239
if not args.stay_connected:
240-
exit()
240+
return
241241

242242
async def reconnect_hub():
243243
if not await questionary.confirm(
@@ -285,7 +285,7 @@ async def reconnect_hub():
285285
elif response == response_options[1]:
286286
await hub.download(script_path)
287287
else:
288-
exit()
288+
return
289289

290290
except HubPowerButtonPressedError:
291291
# This means the user pressed the button on the hub to re-start the

0 commit comments

Comments
 (0)