Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 08:39:00

0001 import re
0002 import sys
0003 
0004 from pandacommon.liveconfigparser.LiveConfigParser import (
0005     LiveConfigParser,
0006     expand_values,
0007 )
0008 
0009 from . import config_utils
0010 
0011 # get ConfigParser
0012 tmp_conf = LiveConfigParser()
0013 
0014 # read
0015 tmp_conf.read("panda_server.cfg")
0016 
0017 # get daemon section
0018 tmp_dict = getattr(tmp_conf, "mcp", {})
0019 
0020 # read configmap
0021 config_utils.load_config_map("mcp", tmp_dict)
0022 
0023 # expand all values
0024 tmp_self = sys.modules[__name__]
0025 expand_values(tmp_self, tmp_dict)
0026 
0027 # default values
0028 if "transport" not in tmp_self.__dict__:
0029     tmp_self.__dict__["transport"] = "streamable-http"
0030 
0031 if "endpoint_list_file" not in tmp_self.__dict__:
0032     tmp_self.__dict__["endpoint_list_file"] = "/opt/panda/etc/panda/panda_mcp_endpoints.json"
0033 
0034 if "ssl_keyfile" not in tmp_self.__dict__:
0035     tmp_self.__dict__["ssl_keyfile"] = None
0036 
0037 if "ssl_certfile" not in tmp_self.__dict__:
0038     tmp_self.__dict__["ssl_certfile"] = None