def CreateSitemapFromFile(configpath, suppress_notify):
 num_errors = output.num_errors
 sitemap = Sitemap(suppress_notify)
 try:
  output.Log(('Reading configuration file: %s' % configpath), 0)
  xml.sax.parse(configpath, sitemap)
 except IOError:
  output.Error(('Cannot read configuration file: %s' % configpath))
 except xml.sax._exceptions.SAXParseException as e:
  output.Error(('XML error in the config file (line %d, column %d): %s' % (e._linenum, e._colnum, e.getMessage())))
 except xml.sax._exceptions.SAXReaderNotAvailable:
  output.Error('Some installs of Python 2.2 did not include complete support for XML.\n  Please try upgrading your version of Python and re-running the script.')
 if (num_errors == output.num_errors):
  return sitemap
 return None

def CreateSitemapFromFile ( configpath , suppress_notify ) : num_errors = output . num_errors sitemap = Sitemap ( suppress_notify ) try : output . Log ( ( 'Reading configuration file: %s' % configpath ) , 0 ) xml . sax . parse ( configpath , sitemap ) except IOError : output . Error ( ( 'Cannot read configuration file: %s' % configpath ) ) except xml . sax . _exceptions . SAXParseException as e : output . Error ( ( 'XML error in the config file (line %d, column %d): %s' % ( e . _linenum , e . _colnum , e . getMessage ( ) ) ) ) except xml . sax . _exceptions . SAXReaderNotAvailable : output . Error ( 'Some installs of Python 2.2 did not include complete support for XML.\n  Please try upgrading your version of Python and re-running the script.' ) if ( num_errors == output . num_errors ) : return sitemap return None
sets up a new sitemap object from the specified configuration file .