X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fbuildman%2Fbsettings.py;h=b36146918005b92ce6eafd5af88ba664b0200bfa;hb=2cb11b35e8b2b21a00b5d1c1c76404cb65d1ceb9;hp=9eb9b2bd53aad8e2b19921f62e4c232363788262;hpb=7024ab6316ab18db8d1a25204a240111548357b4;p=oweals%2Fu-boot.git diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py index 9eb9b2bd53..b361469180 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)