def _ProcessFile(self, path):
    """Do per-file reading/parsing/consuming for the file path passed in."""
    assert path

    # Open our file
    (frame, file) = OpenFileForRead(path, 'SITEMAP')
    if not file:
      return

    # Rev up the SAX engine
    try:
      self._current = -1
      xml.sax.parse(file, self)
    except SchemaError:
      output.Error('An error in file "%s" made us abort reading the Sitemap.'
                   % path)
    except IOError:
      output.Error('Cannot read from file "%s"' % path)
    except xml.sax._exceptions.SAXParseException, e:
      output.Error('XML error in the file "%s" (line %d, column %d): %s' %
                   (path, e._linenum, e._colnum, e.getMessage()))

    # Clean up
    file.close()
    if frame:
      frame.close()
  #end def _ProcessFile
dataset/ETHPy150Open benoitc/gunicorn/docs/sitemap_gen.py/InputSitemap._ProcessFile/original