Add update in get config

This commit is contained in:
El Mau 2021-11-02 22:32:32 -06:00
parent 51de4e75a7
commit 9f16224a82
1 changed files with 3 additions and 1 deletions

View File

@ -333,9 +333,11 @@ def create_instance(name: str, with_context: bool=False, args: Any=None) -> Any:
return instance
def get_app_config(node_name: str, key: str=''):
def get_app_config(node_name: str, key: str='', update: bool=False):
name = 'com.sun.star.configuration.ConfigurationProvider'
service = 'com.sun.star.configuration.ConfigurationAccess'
if update:
service = 'com.sun.star.configuration.ConfigurationUpdateAccess'
cp = create_instance(name, True)
node = PropertyValue(Name='nodepath', Value=node_name)
try: