Exemplo n.º 1
0
    def changeInit(self,macs):
	mac_list=map(lambda mac:mac.strip(),MultiStr(macs))

	for mac in mac_list:
	    if not maclib.checkMacAddress(mac):
		raise GeneralException(errorText("GENERAL","INVALID_MAC_ADDRESS")%mac)

	self.useGenerateQuery({"limit_mac":",".join(mac_list)})
Exemplo n.º 2
0
    def changeInit(self, macs):
        mac_list = map(lambda mac: mac.strip(), MultiStr(macs))

        for mac in mac_list:
            if not maclib.checkMacAddress(mac):
                raise GeneralException(
                    errorText("GENERAL", "INVALID_MAC_ADDRESS") % mac)

        self.useGenerateQuery({"limit_mac": ",".join(mac_list)})
Exemplo n.º 3
0
 def __checkMac(self):
     for mac in self.mac:
         if not maclib.checkMacAddress(mac):
             raise GeneralException(errorText("GENERAL","INVALID_MAC_ADDRESS")%mac)
Exemplo n.º 4
0
 def __checkMac(self):
     for mac in self.mac:
         if not maclib.checkMacAddress(mac):
             raise GeneralException(errorText("GENERAL", "INVALID_MAC_ADDRESS") % mac)