get_dbus#

pytest_bluezenv.get_dbus(session=False, private=False)[source]#

Get DBus system or session bus.

This should be used instead of dbus.SystemBus(), dbus.SessionBus() as it does additional checks and disables exit-on-disconnect to avoid problems.

Parameters:
  • session (bool) – get session bus instead of system bus.

  • private (bool) – get private bus instance instead of shared.

Note

Only available for VM-host code in the lower tester.

Returns:

system or session bus connection.

Return type:

object