diff options
Diffstat (limited to 'tools/buildman/bsettings.py')
-rw-r--r-- | tools/buildman/bsettings.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py index 9eb9b2b..b361469 100644 --- a/tools/buildman/bsettings.py +++ b/tools/buildman/bsettings.py @@ -43,3 +43,13 @@ def GetItems(section): return [] except: raise + +def SetItem(section, tag, value): + """Set an item and write it back to the settings file""" + global settings + global config_fname + + settings.set(section, tag, value) + if config_fname is not None: + with open(config_fname, 'w') as fd: + settings.write(fd) |