Skip to content

Commit

Permalink
Fix bug #500: suppress warning about failed inhibit suspend if run as…
Browse files Browse the repository at this point in the history
… root
  • Loading branch information
Germar committed Nov 23, 2015
1 parent bc6d6bd commit 18523d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 3 additions & 0 deletions common/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 18523d5

Please sign in to comment.