Re: [PATCH] bbremote: fix the exit usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux