def addaddr(self, addr): """ Add address to to network interface. :param str addr: address to add :return: nothing """ if self.up: subprocess.check_call([constants.IP_BIN, "addr", "add", str(addr), "dev", self.name]) PyCoreNetIf.addaddr(self, addr)
def addaddr(self, addr): """ Add address to to network interface. :param str addr: address to add :return: nothing :raises CoreCommandError: when there is a command exception """ if self.up: utils.check_cmd([constants.IP_BIN, "addr", "add", str(addr), "dev", self.name]) PyCoreNetIf.addaddr(self, addr)