Extend PIO Home RPC with "project.config_update_description(path, text)" method

This commit is contained in:
Ivan Kravets
2019-11-06 00:05:17 +02:00
parent bcf09964ab
commit e5ec4de3a4

View File

@ -55,6 +55,14 @@ class ProjectRPC(object):
config.update(data, clear=True)
return config.save()
@staticmethod
def config_update_description(path, text):
config = ProjectConfig(path, parse_extra=False, expand_interpolations=False)
if not config.has_section("platformio"):
config.add_section("platformio")
config.set("platformio", "description", text)
return config.save()
@staticmethod
def get_config_schema():
return get_config_options_schema()