Comment 4 for bug 585189

Revision history for this message
Nikil Mehta (nikil.mehta) wrote : Re: "No Battery" detected for laptops with multiple batteries

Here's the output:

~ -> /usr/lib/battery-status/battery-status --window
Traceback (most recent call last):
  File "/usr/lib/battery-status/battery-status", line 3099, in <module>
    main(sys.argv)
  File "/usr/lib/battery-status/battery-status", line 3080, in main
    run_in_window()
  File "/usr/lib/battery-status/battery-status", line 3067, in run_in_window
    applet_factory(app, None)
  File "/usr/lib/battery-status/battery-status", line 3034, in applet_factory
    BatteryApplet(applet, iid)
  File "/usr/lib/battery-status/battery-status", line 1333, in __init__
    self.init_power_dbus()
  File "/usr/lib/battery-status/battery-status", line 2425, in init_power_dbus
    self.power_dbus_signal()
  File "/usr/lib/battery-status/battery-status", line 2577, in power_dbus_signal
    for battery_address in battery_devices:
NameError: global name 'battery_devices' is not defined

Looks like a typo. If I replace 'battery_devices' with 'power_battery_devices' it seems to work.

It would be nice if it tried to select the battery that it displays information for based on the one that is currently discharging. Of course, the ideal scenario would be to display information about both batteries, like the default battery status indicator that ships with Lucid :)