Read brightness from HAL.
00312 : """ Read brightness from HAL. """ if not self.hasBrightness: debug("Brightness setting not supported.") return try: b = self.brightnessObject.GetBrightness( dbus_interface="org.freedesktop.Hal.Device.LaptopPanel") except dbus.DBusException, e: # Sometimes, right after resume, the HAL call # fails, in that case, we return the last value # and hope that it goes well next time. print "Warning: in getBrightness(): ", e # try and return the old brightness setting, but don't die in any case: try: return self.old_b except AttributeError, errmsg: return self.old_b = b return b def adjustBrightness(self, level):