MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _read_main_config

Function _read_main_config

SLiCAP/SLiCAPconfigure.py:389–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387 return config_dict
388
389def _read_main_config():
390 try:
391 path = _get_home_path() + "SLiCAP.ini"
392 if os.path.isfile(path):
393 config_dict = configparser.ConfigParser()
394 with open(path) as f:
395 config_dict.read_file(f)
396 else:
397 print("Generating main configuration file: ~/SLiCAP.ini.\n")
398 config_dict = _generate_main_config()
399 _write_main_config(config_dict)
400 except:
401 config_dict = configparser.ConfigParser()
402 return config_dict
403
404def _write_project_config(config_dict):
405 with open("SLiCAP.ini", "w") as f:

Callers 1

_update_ini_filesFunction · 0.85

Calls 3

_get_home_pathFunction · 0.85
_generate_main_configFunction · 0.85
_write_main_configFunction · 0.85

Tested by

no test coverage detected