mirror of
git://github.com/lxc/lxc
synced 2025-09-05 14:49:35 +00:00
Merge pull request #995 from ar45/fix_system_error_init_container_failed
set PyErr when Container.__init__ fails
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user