def get_site_config(sites_path=None, site_path=None):
 config = {}
 sites_path = (sites_path or getattr(local, u'sites_path', None))
 site_path = (site_path or getattr(local, u'site_path', None))
 if sites_path:
  common_site_config = os.path.join(sites_path, u'common_site_config.json')
  if os.path.exists(common_site_config):
   config.update(get_file_json(common_site_config))
 if site_path:
  site_config = os.path.join(site_path, u'site_config.json')
  if os.path.exists(site_config):
   config.update(get_file_json(site_config))
  elif (local.site and (not local.flags.new_site)):
   print u'{0} does not exist'.format(local.site)
   sys.exit(1)
 return _dict(config)

def get_site_config ( sites_path = None , site_path = None ) : config = { } sites_path = ( sites_path or getattr ( local , u'sites_path' , None ) ) site_path = ( site_path or getattr ( local , u'site_path' , None ) ) if sites_path : common_site_config = os . path . join ( sites_path , u'common_site_config.json' ) if os . path . exists ( common_site_config ) : config . update ( get_file_json ( common_site_config ) ) if site_path : site_config = os . path . join ( site_path , u'site_config.json' ) if os . path . exists ( site_config ) : config . update ( get_file_json ( site_config ) ) elif ( local . site and ( not local . flags . new_site ) ) : print u'{0} does not exist' . format ( local . site ) sys . exit ( 1 ) return _dict ( config )
returns site_config .