Problem:
Currently, there is no variable or method to instantaneously check whether or not the dbus connection is alive. There is only bus.wait_for_disconnect(), which will wait for a disconnect rather than immediately return whether or not the connection is active.
Workaround:
One way to do this with the current release is bus._disconnect_future.done(), but this requires a private instance variable.
Proposal:
Expose a public variable or method that allows a user to check if the bus is connected. For example, bus.is_connected():
def is_connected() -> bool:
return not self._disconnect_future.done()
Problem:
Currently, there is no variable or method to instantaneously check whether or not the dbus connection is alive. There is only
bus.wait_for_disconnect(), which will wait for a disconnect rather than immediately return whether or not the connection is active.Workaround:
One way to do this with the current release is
bus._disconnect_future.done(), but this requires a private instance variable.Proposal:
Expose a public variable or method that allows a user to check if the bus is connected. For example,
bus.is_connected():