示例#1
0
 def on_imi_session_boot_activate(self, _widget):
     """Handle imi_session_boot.activate event."""
     clients = self.get_selected_clients()
     if not clients:  # No client selected, send the command to all
         clients = self.cstore
     for client in clients:
         # Make sure that only offline computers will be sent to wol
         client = client[C_INSTANCE]
         if client.is_offline():
             wol.wake_on_lan(client.mac)
示例#2
0
文件: gui.py 项目: a926kujfkuyf/fgs
 def wake_on_lan(self, widget):
     """Boot the selected computers with WOL"""
     clients = self.getSelectedClients()
     if len(clients) == 0:  # No client selected, send the command to all
         clients = self.cstore
     for client in clients:
         # Make sure that only offline computers will be sent to wol
         client = client[C_INSTANCE]
         if client.is_offline():
             wol.wake_on_lan(client.mac)