[gnome-settings-daemon/wip/hadess/power-add-coarse-level-support] power: Don't throw warnings when systemd is too old
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/hadess/power-add-coarse-level-support] power: Don't throw warnings when systemd is too old
- Date: Wed, 27 Nov 2019 12:00:09 +0000 (UTC)
commit dd2395001ebbce6f8570713482687104b248d317
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 27 12:57:13 2019 +0100
power: Don't throw warnings when systemd is too old
We still have a fallback mechanism, so don't be noisy if systemd is too
old.
plugins/power/gsd-backlight.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/plugins/power/gsd-backlight.c b/plugins/power/gsd-backlight.c
index f4d60306..f14ca533 100644
--- a/plugins/power/gsd-backlight.c
+++ b/plugins/power/gsd-backlight.c
@@ -848,6 +848,11 @@ gsd_backlight_initable_init (GInitable *initable,
* this is expected.
*/
g_clear_error (&logind_error);
+ } else if (g_error_matches (logind_error, G_DBUS_ERROR,
+ G_DBUS_ERROR_UNKNOWN_METHOD)) {
+ /* systemd version is too old, so ignore.
+ */
+ g_clear_error (&logind_error);
} else {
/* Fail on anything else */
g_clear_object (&backlight->logind_proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]