mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Cache loaded project config
This commit is contained in:
@ -334,12 +334,8 @@ def get_projectdata_dir():
|
||||
"data"))
|
||||
|
||||
|
||||
def load_project_config(path=None):
|
||||
if not path or isdir(path):
|
||||
path = join(path or get_project_dir(), "platformio.ini")
|
||||
if not isfile(path):
|
||||
raise exception.NotPlatformIOProject(
|
||||
dirname(path) if path.endswith("platformio.ini") else path)
|
||||
@memoized()
|
||||
def _load_project_config(path):
|
||||
cp = ProjectConfig()
|
||||
try:
|
||||
cp.read(path)
|
||||
@ -348,6 +344,15 @@ def load_project_config(path=None):
|
||||
return cp
|
||||
|
||||
|
||||
def load_project_config(path=None):
|
||||
if not path or isdir(path):
|
||||
path = join(path or get_project_dir(), "platformio.ini")
|
||||
if not isfile(path):
|
||||
raise exception.NotPlatformIOProject(
|
||||
dirname(path) if path.endswith("platformio.ini") else path)
|
||||
return _load_project_config(path)
|
||||
|
||||
|
||||
def parse_conf_multi_values(items):
|
||||
result = []
|
||||
if not items:
|
||||
|
Reference in New Issue
Block a user