From: Sascha Hauer <sha@pengutronix.de>
To: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Cc: barebox@lists.infradead.org, Marco Felsch <m.felsch@pengutronix.de>
Subject: Re: [PATCH] bbremote: fix the exit usage
Date: Mon, 1 Mar 2021 16:50:53 +0100 [thread overview]
Message-ID: <20210301155053.GE5549@pengutronix.de> (raw)
In-Reply-To: <b6704ce8e092b1ae6f975d755c969ecb64f6428a.camel@pengutronix.de>
Marco,
On Wed, Feb 24, 2021 at 02:22:38PM +0100, Rouven Czerwinski wrote:
> 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
Could you adjust the commit message accordingly?
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2021-03-01 15:52 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
2021-03-01 15:50 ` Sascha Hauer [this message]
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=20210301155053.GE5549@pengutronix.de \
--to=sha@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.felsch@pengutronix.de \
--cc=r.czerwinski@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