I am using python to determine the status of an upstart job on Ubuntu.
I've recently changed the upstart job so that it has an Instance stanza as such: instance $some_var
. As expected, my code no longer works.
If I try:
path = upstart.GetJobByName("test", dbus_interface="com.ubuntu.Upstart0_6")
job = bus.get_object("com.ubuntu.Upstart", path)
path = job.GetInstance([], dbus_interface="com.ubuntu.Upstart0_6.Job")
It fails telling me dbus.exceptions.DBusException: org.freedesktop.DBus.Error.InvalidArgs: Unknown parameter: some_var
I need to pass the some_var environment variable to the dbus interface. How might I do that? Setting it in os.environ doesn't appear to do the trick.