Re: [PATCH] bbremote: fix the exit usage

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

 



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@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