diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-06-29 22:58:51 -0400 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-07-10 22:34:50 -0400 |
commit | 70852a3850a2c6947d9c1004675213d5a262592c (patch) | |
tree | 129f0897c9047cd10984b4307e2238b8d711a7c4 /pysensormgr | |
parent | fa736499c75aa7b5d15134188c2a3875ec5b2f37 (diff) | |
download | talos-skeleton-70852a3850a2c6947d9c1004675213d5a262592c.tar.gz talos-skeleton-70852a3850a2c6947d9c1004675213d5a262592c.zip |
Defer busname ownership until init complete
Avoid race conditions where applications expecting an object to be
present upon recipt of NameOwnerChanged find that the object hasn't
been created yet.
Change-Id: I4236a3898055a84b00e1eaf37f32e0192b683a0f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'pysensormgr')
-rw-r--r-- | pysensormgr/sensor_manager2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pysensormgr/sensor_manager2.py b/pysensormgr/sensor_manager2.py index d8fa013..34ea0fc 100644 --- a/pysensormgr/sensor_manager2.py +++ b/pysensormgr/sensor_manager2.py @@ -45,7 +45,6 @@ class SensorManager(DbusProperties,DbusObjectManager): if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = get_dbus() - name = dbus.service.BusName(DBUS_NAME,bus) root_sensor = SensorManager(bus,OBJ_PATH) @@ -60,6 +59,7 @@ if __name__ == '__main__': root_sensor.add(obj_path, sensor_obj) mainloop = gobject.MainLoop() + name = dbus.service.BusName(DBUS_NAME,bus) print "Starting sensor manager" mainloop.run() |