Commit 25e032fb by Christian Brauner

Merge pull request #995 from ar45/fix_system_error_init_container_failed

set PyErr when Container.__init__ fails
parents b4e73f49 9dfb0ad9
......@@ -449,7 +449,9 @@ Container_init(Container *self, PyObject *args, PyObject *kwds)
self->container = lxc_container_new(name, config_path);
if (!self->container) {
Py_XDECREF(fs_config_path);
fprintf(stderr, "%d: error creating container %s\n", __LINE__, name);
PyErr_Format(PyExc_RuntimeError, "%s:%s:%d: error during init for container '%s'.",
__FUNCTION__, __FILE__, __LINE__, name);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment