[issue13854] multiprocessing: SystemExit from child with non-int, non-str arg causes TypeError

Jon Brandvein report at bugs.python.org
Wed Jan 25 18:25:48 CET 2012


Jon Brandvein <jon.brandvein at gmail.com> added the comment:

Also, as Brett pointed out to me in #13853, bool is a subclass of int, so they should follow the same code path. I suggest replacing

    elif type(e.args[0]) is int:
        exitcode = e.args[0]

with something like

    elif isinstance(e.args[0], int):
        exitcode = e.args[0]

which assumes that a subtype of int is convertible to int.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13854>
_______________________________________


More information about the Python-bugs-list mailing list