From 18523d5ce170283149fc675ecf34166aa7d949ed Mon Sep 17 00:00:00 2001 From: Germar Reitze Date: Mon, 23 Nov 2015 18:49:07 +0100 Subject: [PATCH] Fix bug #500: suppress warning about failed inhibit suspend if run as root --- CHANGES | 1 + common/tools.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index e67650854..4903f18d1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Back In Time Version 1.1.9 +* Fix bug: suppress warning about failed inhibit suspend if run as root (https://github.com/bit-team/backintime/issues/500) * Fix bug: UI blocked/greyed out while removing snapshot (https://github.com/bit-team/backintime/issues/487) * Fix bug: pw-cache failed on leftover PID file, using ApplicationInstance now (https://github.com/bit-team/backintime/issues/468) * Fix bug: failed to parse some arguments (https://github.com/bit-team/backintime/issues/492) diff --git a/common/tools.py b/common/tools.py index b475c21dc..f012c2910 100644 --- a/common/tools.py +++ b/common/tools.py @@ -754,6 +754,9 @@ def inhibitSuspend( app_id = sys.argv[0], return (cookie, bus, dbus_props) except dbus.exceptions.DBusException: pass + if isRoot(): + logger.debug("Inhibit Suspend failed because BIT was started as root.") + return logger.warning('Inhibit Suspend failed.') def unInhibitSuspend(cookie, bus, dbus_props):