mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Make methods "async" to avoid thread issue with fs.cd
This commit is contained in:
@ -30,7 +30,7 @@ class ProjectRPC(BaseRPCHandler):
|
||||
NAMESPACE = "project"
|
||||
|
||||
@staticmethod
|
||||
def config_call(init_kwargs, method, *args):
|
||||
async def config_call(init_kwargs, method, *args):
|
||||
assert isinstance(init_kwargs, dict)
|
||||
assert "path" in init_kwargs
|
||||
if os.path.isdir(init_kwargs["path"]):
|
||||
@ -110,7 +110,7 @@ class ProjectRPC(BaseRPCHandler):
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def configuration(project_dir, env):
|
||||
async def configuration(project_dir, env):
|
||||
with fs.cd(project_dir):
|
||||
config = ProjectConfig.get_instance()
|
||||
config.validate(envs=[env])
|
||||
|
Reference in New Issue
Block a user