diff --git a/dbusmock/templates/power_profiles_daemon.py b/dbusmock/templates/power_profiles_daemon.py index 9211050..bd863ad 100644 --- a/dbusmock/templates/power_profiles_daemon.py +++ b/dbusmock/templates/power_profiles_daemon.py @@ -15,14 +15,14 @@ __author__ = "Bastien Nocera" __copyright__ = """ (c) 2021, Red Hat Inc. -(c) 2017 - 2022 Martin Pitt +(c) 2017 - 2024 Martin Pitt """ import dbus -BUS_NAME = "net.hadess.PowerProfiles" -MAIN_OBJ = "/net/hadess/PowerProfiles" -MAIN_IFACE = "net.hadess.PowerProfiles" +BUS_NAME = "org.freedesktop.UPower.PowerProfiles" +MAIN_OBJ = "/org/freedesktop/UPower/PowerProfiles" +MAIN_IFACE = "org.freedesktop.UPower.PowerProfiles" SYSTEM_BUS = True diff --git a/pyproject.toml b/pyproject.toml index e1ae523..302fc85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,7 @@ ignore_missing_imports = true line-length = 130 preview = true +[tool.ruff.lint] select = [ "A", # flake8-builtins "B", # flake8-bugbear diff --git a/tests/run-debian b/tests/run-debian index 0db1640..bcd9456 100644 --- a/tests/run-debian +++ b/tests/run-debian @@ -16,6 +16,12 @@ eatmydata apt-get install --no-install-recommends -y git \ python3-dbus python3-pytest python3-gi gir1.2-glib-2.0 \ dbus libnotify-bin upower network-manager bluez ofono ofono-scripts +# power-profiles-daemon 0.20 did not yet land in Ubuntu 24.04 +. /etc/os-release +if [ "$ID" = "debian" ]; then + eatmydata apt-get install -y power-profiles-daemon +fi + # systemd's tools otherwise fail on "not been booted with systemd" mkdir -p /run/systemd/system