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>
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;
}