Commit de86840a by Stéphane Graber

python3: Add controllable property to the binding

parent 5d15c21a
......@@ -456,6 +456,16 @@ Container_config_file_name(Container *self, void *closure)
}
static PyObject *
Container_controllable(Container *self, void *closure)
{
if (self->container->may_control(self->container)) {
Py_RETURN_TRUE;
}
Py_RETURN_FALSE;
}
static PyObject *
Container_defined(Container *self, void *closure)
{
if (self->container->is_defined(self->container)) {
......@@ -1101,6 +1111,10 @@ static PyGetSetDef Container_getseters[] = {
(getter)Container_config_file_name, NULL,
"Path to the container configuration",
NULL},
{"controllable",
(getter)Container_controllable, NULL,
"Boolean indicating whether the container may be controlled",
NULL},
{"defined",
(getter)Container_defined, NULL,
"Boolean indicating whether the container configuration exists",
......
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