Skip to content
Commit 50b9b124 authored by Ulf Magnusson's avatar Ulf Magnusson Committed by Carles Cufí
Browse files

scripts: Simplify code with sys.exit(<string>)

Promote a handy and often-overlooked sys.exit() feature: Passing it a
string (or any other non-int object) prints it to stderr and exits with
status 1.

See the documentation at
https://docs.python.org/3/library/sys.html#sys.exit

.

This indirectly prints some errors to stderr that previously went to
stdout.

Signed-off-by: default avatarUlf Magnusson <Ulf.Magnusson@nordicsemi.no>
parent c898c156
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment