commit | 50b9b1249b1996c084ec3c5c5fb2c8a2c1d436e9 | [log] [tgz] |
---|---|---|
author | Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> | Sat Sep 07 14:41:01 2019 +0200 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Sun Sep 08 12:34:16 2019 +0200 |
tree | 7fbaebf32d35a1d7bf03a4ed860cb53f93632385 | |
parent | c898c156c93ab8b06d9a1dc6027274b1cb0135b8 [diff] |
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: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>