fixed xml 0.0 failing

This commit is contained in:
Blake J. Harnden 2018-06-07 09:09:56 -07:00
parent 2ede43e3ae
commit e4aaebfefb

View file

@ -370,18 +370,20 @@ class CoreDocumentWriter0(Document):
""" """
# options # options
options = self.createElement("SessionOptions") options = self.createElement("SessionOptions")
defaults = self.session.options.getdefaultvalues() defaults = self.session.options.default_values()
for i, (k, v) in enumerate(self.session.options.getkeyvaluelist()): for name, current_value in self.session.options.get_configs().iteritems():
if str(v) != str(defaults[i]): default_value = defaults[name]
xmlutils.add_text_param_to_parent(self, options, k, v) if current_value != default_value:
# addparamtoparent(self, options, k, v) xmlutils.add_text_param_to_parent(self, options, name, current_value)
if options.hasChildNodes(): if options.hasChildNodes():
self.meta.appendChild(options) self.meta.appendChild(options)
# hook scripts # hook scripts
self.addhooks() self.addhooks()
# meta # meta
meta = self.createElement("MetaData") meta = self.createElement("MetaData")
self.meta.appendChild(meta) self.meta.appendChild(meta)
for k, v in self.session.metadata.items(): for name, current_value in self.session.metadata.get_configs().iteritems():
xmlutils.add_text_param_to_parent(self, meta, k, v) xmlutils.add_text_param_to_parent(self, meta, name, current_value)
# addparamtoparent(self, meta, k, v)