def get_mac_addr(self): """ Convenience function, returns mac addr bound to first non-loopback interface. """ ifname = self.get_if_name() addr = self.get_if_mac(ifname) return textutil.hexstr_to_bytearray(addr)
def get_mac_addr(self): """ Convienience function, returns mac addr bound to first non-loopback interface. """ ifname = '' while len(ifname) < 2: ifname = self.get_first_if()[0] addr = self.get_if_mac(ifname) return textutil.hexstr_to_bytearray(addr)
def get_mac_addr(self): """ Convienience function, returns mac addr bound to first non-loopback interface. """ ifname='' while len(ifname) < 2 : ifname=self.get_first_if()[0] addr = self.get_if_mac(ifname) return textutil.hexstr_to_bytearray(addr)