#7910 HIGH 8.2.0 (: olpc-update should inhibit OHM suspend

Zarro Boogs per Child bugtracker at laptop.org
Mon Aug 11 15:59:56 EDT 2008


#7910: olpc-update should inhibit OHM suspend
----------------------------+-----------------------------------------------
   Reporter:  cjb           |       Owner:  cscott              
       Type:  defect        |      Status:  new                 
   Priority:  high          |   Milestone:  8.2.0 (was Update.2)
  Component:  not assigned  |     Version:  not specified       
 Resolution:                |    Keywords:                      
Next_action:  code          |    Verified:  0                   
  Blockedby:                |    Blocking:                      
----------------------------+-----------------------------------------------
Changes (by cjb):

  * owner:  cjb => cscott


Comment:

 Scott, here's the stanza:

 {{{
 import dbus

 try:
     bus = dbus.SystemBus()
     keystore = bus.get_object('org.freedesktop.ohm',
                              '/org/freedesktop/ohm/Keystore',
                              'org.freedesktop.ohm.Keystore')
     # Find out the current state.
     inhibit = keystore.GetKey('suspend.inhibit')
     print inhibit

     # Set to inhibit.
     keystore.SetKey('suspend.inhibit', 1)
     inhibit = keystore.GetKey('suspend.inhibit')
     print inhibit

     # When done, unset inhibit.
     keystore.SetKey('suspend.inhibit', 0)
     inhibit = keystore.GetKey('suspend.inhibit')
     print inhibit
 except dbus.DBusException, e:
     print "Error setting OHM inhibit: %s" % e
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/7910#comment:1>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list