(data)
return ':'.join(['{:02x}'.format(i) for i in unpacked])
Unpacks and formats MAC address data.

  Args:
    data: buffer, usually an NSCFData object
  Returns:
    string containing the MAC address
  Raises:
    InterfaceError: if data can't be unpacked
Unpacks and formats MAC address data.
Unpacks and formats MAC address data .
def _GetMACFromData(data):
  """Unpacks and formats MAC address data.

  Args:
    data: buffer, usually an NSCFData object
  Returns:
    string containing the MAC address
  Raises:
    InterfaceError: if data can't be unpacked
  """
  try:
    unpacked = struct.unpack_from('BBBBBB', data)
  except struct.error as e:
    logging.error('Could not unpack MAC address data: %s', e)
    raise InterfaceError(e)
  return ':'.join(['{:02x}'.format(i) for i in unpacked])
def _GetMACFromData ( data ) : try : unpacked = struct . unpack_from ( 'BBBBBB' , data ) except struct . error as e : logging . error ( 'Could not unpack MAC address data: %s' , e ) raise InterfaceError ( e ) return ':' . join ( [ '{:02x}' . format ( i ) for i in unpacked ] )