Esempio n. 1
0
 def __device_added(self, udi):
     (prop_iface, dev_iface) = self.__get_battery(udi)
     try:
         type = prop_iface.Get(self.device_interface, 'type')
         if type == self.bat_type:
             power_bat = DeviceKitBattery(prop_iface, dev_iface)
             power_bat.set_left_popup_menu_action(self.__mc_action)
             power_bat.update()
             self.__batteries[udi] = power_bat
     except DBusException:
         pass
Esempio n. 2
0
 def __device_added(self, udi):
     (prop_iface, dev_iface) = self.__get_battery(udi)
     try:
         type = prop_iface.Get(self.device_interface, 'type')
         if type == self.bat_type:
             power_bat = DeviceKitBattery(prop_iface, dev_iface)
             power_bat.set_left_popup_menu_action(self.__mc_action)
             power_bat.update()
             self.__batteries[udi] = power_bat
     except DBusException:
         pass