Sugar Learning Environment, Activity Toolkit, GTK 3.
Go to file
James Cameron f1fc9886cc power: avoid filesystem access if powerd absent
On commodity hardware without olpc-powerd, there is unnecessary
filesystem access.

On XO laptop hardware there are unnecessary errors in log for every
object delete:

	ERROR root: Inhibit Suspend: Could not delete file
	/var/run/powerd-inhibit-suspend/1773

	Exception AttributeError: "'NoneType' object has no attribute
	'endswith'" in <bound method PowerManager.__del__ of
	<sugar3.power.PowerManager instance at 0xa15962c>> ignored

The Clock activity in speaking mode is a good reproducer.

Following changes are made:

- move the directory check to __init__, and set self._path to None if
  olpc-powerd is not present,

- on inhibit_suspend, use self._path, which avoids a check of the
  directory,

- on restore_suspend or __del__, avoid a call to os.unlink if
  olpc-powerd is not present.
2015-05-14 20:24:32 +10:00
bin Avoid breaking activity startup by dbus timeout on sigle instance - Fixes #4773 2014-05-21 14:40:51 -04:00
examples Fixes for pep8 1.5 2014-03-29 19:25:34 +00:00
m4 Add simple toolbars example 2009-07-10 04:07:10 +00:00
po Update Igbo translations from ibo.po 2015-03-10 10:58:03 -03:00
src power: avoid filesystem access if powerd absent 2015-05-14 20:24:32 +10:00
tests Implement mime.get_mime_parents using python 2014-03-08 15:34:23 +01:00
.gitignore Update .gitignore 2013-09-11 15:29:22 +02:00
AUTHORS
autogen.sh Modernize gettext setup 2014-03-30 11:54:48 +01:00
configure.ac Release 0.105.0 2015-04-20 13:52:25 -04:00
COPYING
MAINTAINERS Add MAINTAINERS file 2011-12-13 17:37:50 -03:00
Makefile.am Add missing translations 2014-03-30 11:58:36 +01:00
README Test commit 2014-05-11 22:21:12 +02:00

Sugar is the core of the OLPC Human Interface. The toolkit provides
a set of widgets to build HIG compliant applications and interfaces
to interact with system services like presence and the datastore.