After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588124 - Python calls to Inhibit() are crashing
Python calls to Inhibit() are crashing
Status: RESOLVED DUPLICATE of bug 472812
Product: gnome-power-manager
Classification: Deprecated
Component: applets
2.27.x
Other All
: Normal critical
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-07-09 01:08 UTC by Scott Howard
Modified: 2009-07-20 21:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
output from gnome-power-bugreport (1.45 KB, text/plain)
2009-07-09 01:09 UTC, Scott Howard
Details

Description Scott Howard 2009-07-09 01:08:01 UTC
Steps to reproduce:
1. Call the inhibit functions either by using "gnome-power-manager-inhibit test" or following the examples at the FAQ or bug 472812. (/usr/bin/gnome-power-manager-inhibit)
2. The Inhibit function will crash

An example Python script which works in 2.24 but not in 2.27:
#!/usr/bin/env python
import dbus
bus = dbus.SessionBus()

devobj = bus.get_object('org.freedesktop.PowerManagement',
'/org/freedesktop/PowerManagement/Inhibit')
power = dbus.Interface(devobj, "org.freedesktop.PowerManagement.Inhibit")
cookie = power.Inhibit('application name', 'reason')
power.UnInhibit(cookie)



Stack trace:
Traceback (most recent call last):
  • File "/usr/bin/gnome-power-manager-inhibit", line 34 in <module>
    cookie = gpm.Inhibit("Command Line: " + sys.argv[1], "Long Execution")
  • File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68 in __call__
    return self._proxy_method(*args, **keywords)
  • File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140 in __call__
    **keywords)
  • File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620 in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signature "ss" on interface "(null)" doesn't exist


Other information:
Additionally, I have not been able to get the inhibit applet to work at all in GPM 2.27. When I click on it on the panel, nothing happens. Nothing shows up on gnome-power-manager --no-daemon --verbose or across the dbus-monitor --session "type='signal',interface='org.freedesktop.PowerManagement'" when I attempt to use the inhibit applet in the gnome panel. If these are two bugs, they should be separated out - but I have a feeling that they are related (but no data to back that up yet).

Original downstream reports:
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/383637
https://bugs.launchpad.net/bugs/389857
Comment 1 Scott Howard 2009-07-09 01:09:26 UTC
Created attachment 138083 [details]
output from gnome-power-bugreport
Comment 2 Scott Howard 2009-07-09 01:13:05 UTC
ubuntu@ubuntu:~$ polkit-auth | grep power-management
org.freedesktop.hal.power-management.shutdown
org.freedesktop.hal.power-management.shutdown-multiple-sessions
org.freedesktop.hal.power-management.reboot
org.freedesktop.hal.power-management.reboot-multiple-sessions
org.freedesktop.hal.power-management.set-powersave
org.freedesktop.hal.power-management.suspend
org.freedesktop.hal.power-management.hibernate
org.freedesktop.hal.power-management.cpufreq
org.freedesktop.hal.power-management.lcd-panel
org.freedesktop.hal.power-management.light-sensor
org.freedesktop.hal.power-management.keyboard-backlight
Comment 3 Scott Howard 2009-07-20 21:14:52 UTC

*** This bug has been marked as a duplicate of 472812 ***