Exemplo n.º 1
0
def getCurrentList():
	try:
		macs = wol.getWOLList()
		arps = wol.getArpList()
		result = []
		for mac in macs:
			ip = "?"
			for arp in arps:
				if arp[1] == mac:
					ip = arp[0]
					break
			result.append(("%s\t%s" % (mac, ip), mac))
		return result
	except Exception, ex:
		print "[WOL] Failed to load config:", ex
		return []
Exemplo n.º 2
0
def getCurrentList():
    try:
        macs = wol.getWOLList()
        arps = wol.getArpList()
        result = []
        for mac in macs:
            ip = "?"
            for arp in arps:
                if arp[1] == mac:
                    ip = arp[0]
                    break
            result.append(("%s\t%s" % (mac, ip), mac))
        return result
    except Exception, ex:
        print "[WOL] Failed to load config:", ex
        return []
Exemplo n.º 3
0
	def doadd(self):
		items = [("%s\t%s" % (x[1],x[0]), x[1]) for x in wol.getArpList()]
		self.session.openWithCallback(self.doaddDone, ChoiceBox, list = items)
Exemplo n.º 4
0
 def doadd(self):
     items = [("%s\t%s" % (x[1], x[0]), x[1]) for x in wol.getArpList()]
     self.session.openWithCallback(self.doaddDone, ChoiceBox, list=items)