[openstack-dev] [infra][neutron]SystemExit() vs sys.exit()?

Salvatore Orlando sorlando at nicira.com
Thu May 1 16:17:14 UTC 2014


The patch you've been looking at just changes the way in which SystemExit
is used, it does not replace it with sys.exit.
In my experience sys.exit was causing unit test threads to interrupt
abruptly, whereas SystemExit was being caught by the test runner and
handled.
I find therefore a bit strange that you're reporting what appears to be the
opposite behaviour.

Maybe if you could share the code you're working on we can have a look at
it and see what's going on.

Salvatore


On 30 April 2014 21:08, Paul Michali (pcm) <pcm at cisco.com> wrote:

>  Hi,
>
>  In Neutron I see SystemExit() being raised in some cases. Is this
> preferred over calling sys.exit()?
>
>  I ask, because I recall having a TOX failure where all I was getting was
> the return code, with no traceback or indication at all of where the
> failure occurred. In that case, I changed from SystemExit() to sys.exit()
> and I then got the traceback and was able to see what was going wrong in
> the test case (it’s been weeks, so I don’t recall where this was at).
>
>  I see currently, there is some changes to use of SystemExit() being
> reviewed (https://review.openstack.org/91185), and it reminded me of the
> concern I had.
>
>  Can anyone enlighten me?
>
>
>  Thanks!
>
>  PCM (Paul Michali)
>
>  MAIL …..…. pcm at cisco.com
> IRC ……..… pcm_ (irc.freenode.com)
> TW ………... @pmichali
> GPG Key … 4525ECC253E31A83
> Fingerprint .. 307A 96BB 1A4C D2C7 931D 8D2D 4525 ECC2 53E3 1A83
>
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140501/80a67b58/attachment.html>


More information about the OpenStack-dev mailing list