[Sugar-devel] [PATCH] avoid reporting missing DCON

James Cameron quozl at laptop.org
Wed Feb 18 20:43:58 EST 2015


On Wed, Feb 18, 2015 at 07:13:24PM -0600, Jerry Vonau wrote:
> > On February 18, 2015 at 5:09 PM James Cameron <quozl at laptop.org> wrote:
> >
> >
> > The DCON is OLPC XO specific and the absence need not be reported.
> >
> > Removes message:
> >
> >       ERROR root: Cannot unfreeze the DCON
> >
> > However, this doesn't fix an immediately preceeding message:
> >
> >       ERROR dbus.proxies: Introspect error on
> >       org.freedesktop.ohm:/org/freedesktop/ohm/Keystore:
> >       dbus.exceptions.DBusException:
> >       org.freedesktop.DBus.Error.ServiceUnknown: The name
> >       org.freedesktop.ohm was not provided by any .service files
> >
> > Any ideas how to fix that one?
> 
> check extensions/cpsection/power/model.py

thanks, but the DBus part doesn't seem materially different.

bit of background; src/jarabe/model/screen.py has an OLPC XO feature
to unfreeze the display when Sugar has finished startup.

this is implemented via DBus, and the powerd-dbus/ohm-keystore.c
function ohm_keystore_set_key handles it by sending an event to
powerd.

i guess i could borrow using_powerd from
extensions/cpsection/power/model.py and instead of skipping the Dbus
call if powerd is present, skip if powerd is _absent_.

that will lose backward compatibility with older operating system
versions, but i don't think sugar _has_ that compatibility any longer.

> 
> 
> 
> > ---
> >  src/jarabe/model/screen.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/jarabe/model/screen.py b/src/jarabe/model/screen.py
> > index f70bda1..8c7d1c7 100644
> > --- a/src/jarabe/model/screen.py
> > +++ b/src/jarabe/model/screen.py
> > @@ -42,4 +42,4 @@ def set_dcon_freeze(frozen):
> >      try:
> >          _get_ohm().SetKey('display.dcon_freeze', frozen)
> >      except dbus.DBusException:
> > -        logging.error('Cannot unfreeze the DCON')
> > +        pass
> > --
> > 1.8.3.2
> >
> > _______________________________________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list