code: def _error_parse(self, interface, face):
          
          try:
              error_list = interface.xpath(face + '-error-list')[0].getchildren()
          except IndexError:  # no error list on this interface
              pass
          else:
              for x in range(len(error_list)):
                  if error_list[x].tag == "carrier-transitions":
                      if int(error_list[x].text.strip()) > 50:
                          yield " has greater than 50 flaps."
                  elif int(error_list[x].text.strip()) > 0:
                      yield " has %s of %s." % (error_list[x].text.strip(),
                                                error_list[x].tag.strip())
docs: Parse the extensive xml output of an interface and yield errors.
  
          Purpose: Takes the xml output of 'show interfaces extensive' for a
                 | given interface and yields the error types that have a
                 | significant number of errors.
  
          @param interface: The xml output of the 'sh int ext' command for
                          | the desired interface.
          @type interface: lxml.etree._Element object
          @param face: The direction of the errors we're wanting. Either 'input'
                     | or 'output' is accepted.
          @type face: str
  
          @returns: Yields each error that has a significant number
          @rtype: iterable of strings.