summaryrefslogtreecommitdiff
path: root/tools/buildman/bsettings.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/buildman/bsettings.py')
-rw-r--r--tools/buildman/bsettings.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py
index fdd875b..b361469 100644
--- a/tools/buildman/bsettings.py
+++ b/tools/buildman/bsettings.py
@@ -40,7 +40,16 @@ def GetItems(section):
try:
return settings.items(section)
except ConfigParser.NoSectionError as e:
- print e
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)