def wollist(maclist, bcast='255.255.255.255', destport=9):
 ret = []
 try:
  with salt.utils.fopen(maclist, 'r') as ifile:
   for mac in ifile:
    wol(mac.strip(), bcast, destport)
    print('Waking up {0}'.format(mac.strip()))
    ret.append(mac)
 except Exception as err:
  __jid_event__.fire_event({'error': 'Failed to open the MAC file. Error: {0}'.format(err)}, 'progress')
  return []
 return ret

def wollist ( maclist , bcast = '255.255.255.255' , destport = 9 ) : ret = [ ] try : with salt . utils . fopen ( maclist , 'r' ) as ifile : for mac in ifile : wol ( mac . strip ( ) , bcast , destport ) print ( 'Waking up {0}' . format ( mac . strip ( ) ) ) ret . append ( mac ) except Exception as err : __jid_event__ . fire_event ( { 'error' : 'Failed to open the MAC file. Error: {0}' . format ( err ) } , 'progress' ) return [ ] return ret
send a "magic packet" to wake up a list of minions .