def upower_present(connect):
    conn = connect()
    result = conn.call_method(tdbus.DBUS_PATH_DBUS, 'ListNames',
                              tdbus.DBUS_INTERFACE_DBUS,
                              destination=tdbus.DBUS_SERVICE_DBUS)
    conn.close()
    # see if UPower is in the known services:
    return UPOWER_NAME in (name for name in result.get_args()[0]
                            if not name.startswith(':'))