Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed - set PyErr when Container.__init__ fails #995

Merged
merged 1 commit into from
May 1, 2016

Conversation

ar45
Copy link
Contributor

@ar45 ar45 commented May 1, 2016

When container init failed for whatever reason, previously it resulted
in a SystemError: NULL result without error in PyObject_Call
This will now result in a RuntimeError

>>> import lxc
>>> 
>>> c = lxc.Container('aron')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3/dist-packages/lxc/__init__.py", line 157, in __init__
    _lxc.Container.__init__(self, name)
RuntimeError: Container_init:lxc.c:454: error during init for container 'aron'.
>>> 

Signed-off-by: Aron Podrigal aronp@guaranteedplus.com

When container init failed for whatever reason, previously it resulted
in a `SystemError: NULL result without error in PyObject_Call`
This will now result in a RuntimeError with the error message
previously printed to stderr.

Signed-off-by: Aron Podrigal <aronp@guaranteedplus.com>
@lxc-jenkins
Copy link

This pull request didn't trigger Jenkins as its author isn't in the whitelist.

An organization member must perform one of the following:

  • To have this branch tested by Jenkins, use the "ok to test" command.
  • To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@stgraber
Copy link
Member

stgraber commented May 1, 2016

jenkins: test this please

@brauner brauner merged commit 25e032f into lxc:master May 1, 2016
z-image pushed a commit to z-image/lxc that referenced this pull request Oct 16, 2016
…failed

set PyErr when Container.__init__ fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants