From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH] bbremote: fix the exit usage
Date: Wed, 24 Feb 2021 14:22:38 +0100 [thread overview]
Message-ID: <b6704ce8e092b1ae6f975d755c969ecb64f6428a.camel@pengutronix.de> (raw)
In-Reply-To: <20210224101545.15009-1-m.felsch@pengutronix.de>
Hi,
On Wed, 2021-02-24 at 11:15 +0100, Marco Felsch wrote:
> Unlike the sys.exit() function the builtin exit() function don't take an
> argument. Fix it by using the exit function from the sys module which is
> already imported.
This is not entirely correct, the builtin exit() function also takes an
exit code and works fine when I tested this:
$ python3 -c "exit(1)"; echo $?
1
$
Nevertheless the documentation [1] says that sys.exit() should be used
in scripts. So the patch is fine, but the justification not entirely
correct.
[1]: https://docs.python.org/3/library/constants.html#constants-added-by-the-site-module
Regards,
Rouven Czerwinski
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-02-24 13:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 10:15 Marco Felsch
2021-02-24 13:22 ` Rouven Czerwinski [this message]
2021-03-01 15:50 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6704ce8e092b1ae6f975d755c969ecb64f6428a.camel@pengutronix.de \
--to=r.czerwinski@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.felsch@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox