From a0ff4d5276705e294ed912d4d14be1f3c6b82943 Mon Sep 17 00:00:00 2001 From: Adam Kornafeld Date: Tue, 22 Jul 2008 20:57:25 +0000 Subject: [PATCH] Edit project.xml programmatically svn path=/workspaces/kadam/; revision=15657 --- py/Boinc/projectxml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py/Boinc/projectxml.py b/py/Boinc/projectxml.py index 2b2b0e1344..598b5e6193 100644 --- a/py/Boinc/projectxml.py +++ b/py/Boinc/projectxml.py @@ -31,6 +31,7 @@ class ProjectFile(XMLConfig): default_project_file = self def _get_elements(self): self.xml_boinc = get_element(self.xml, 'boinc', optional=False) + self.elements = ConfigDictList(self.xml_boinc) self.add_objects_and_args = [] for node in self.xml_boinc.childNodes: add_object = add_objects.get(node.nodeName) @@ -38,7 +39,7 @@ class ProjectFile(XMLConfig): raise SystemExit("Error in %s: No such object '%s' to add." %(self.filename,node.nodeName)) self.add_objects_and_args.append((add_object, get_elements_as_dict(node))) def _set_elements(self): - assert(0) # TODO (maybe) + self.elements.save() def commit_all(self): '''Commits all new data to the BOINC project database.''' for add_object, untranslated_args_dict in self.add_objects_and_args: