Dear pystemd team,
With CLI, I can run this command to update /sys/fs/cgroup/system.slice/cpu.weight (just an example) :
# gdbus call --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1/unit/system_2eslice --method org.freedesktop.systemd1.Unit.SetProperties true "[('CPUWeight', <@t 200>)]"
()
But with pystemd, I cannot find how to do this. I tried :
>>> my = pystemd.systemd1.Unit("system.slice")
>>> my.load()
>>> my.Unit.SetProperties(True, [(b"CPUWeight", 200)])
...
TypeError: expected bytes, int found for input "100", element number 4 in input series:
...
>>> my.Unit.SetProperties(True, [(b"CPUWeight", b"200")])
...
pystemd.dbusexc.DBusInconsistentMessageError: [err -74]: b'Bad message'
...
I cannot find a higher level function, nor how to instantiate a 't' type for the VARIANT type expected as parameter.
Cheers
Dear pystemd team,
With CLI, I can run this command to update
/sys/fs/cgroup/system.slice/cpu.weight(just an example) :But with pystemd, I cannot find how to do this. I tried :
I cannot find a higher level function, nor how to instantiate a 't' type for the VARIANT type expected as parameter.
Cheers