Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def powermanage::PowerManage::isLaptop (   self  ) 

Detect if system is laptop. 

Definition at line 145 of file powermanage.py.

00145                       :
        """ Detect if system is laptop. """
        try:
            return IS_LAPTOP
        except NameError:
            pass
        self.computerObject = self.bus.get_object("org.freedesktop.Hal", 
                                                            u'/org/freedesktop/Hal/devices/computer')
        properties = self.computerObject.GetAllProperties(dbus_interface="org.freedesktop.Hal.Device")
        # formfactor sometimes (ppc) also reports "unknown" for laptops
        # workaround: consider laptop anything with primary battery (see LP #64053)
        return properties["system.formfactor"] == "laptop" or self.hasBattery

    def _findDisks(self):


Generated by  Doxygen 1.6.0   Back to index