aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-12-08 23:08:24 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2014-12-08 23:08:24 +0000
commit5186d1c20416dd4726de863b638a49b885ef7b9a (patch)
tree9010f4f245bc7bc078baa3e73f2675b0c5431c61 /src
parent56e88207113e57eae7b24a718fa1ab177c6c9367 (diff)
parent89bb6bbb5e46f9a8c1da3aa756de9f7cfdf57842 (diff)
downloadayatana-indicator-datetime-5186d1c20416dd4726de863b638a49b885ef7b9a.tar.gz
ayatana-indicator-datetime-5186d1c20416dd4726de863b638a49b885ef7b9a.tar.bz2
ayatana-indicator-datetime-5186d1c20416dd4726de863b638a49b885ef7b9a.zip
Don't log an error if powerd isn't available on the system. Fixes: #1384714
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'src')
-rw-r--r--src/wakeup-timer-powerd.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wakeup-timer-powerd.cpp b/src/wakeup-timer-powerd.cpp
index ab6859f..27b037e 100644
--- a/src/wakeup-timer-powerd.cpp
+++ b/src/wakeup-timer-powerd.cpp
@@ -192,8 +192,13 @@ private:
ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(o), res, &error);
if (ret == nullptr)
{
- if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ /* powerd isn't on the desktop, but we don't need hardware wakeups there
+ anyway... so no need to warn on SERVICE_UNKNOWN */
+ if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
+ !g_error_matches(error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN))
+ {
g_warning("%s Could not set hardware wakeup: %s", G_STRLOC, error->message);
+ }
}
else
{