From e4aaebfefb8a6a11fb97a7726e9e0b3268fed2c8 Mon Sep 17 00:00:00 2001 From: "Blake J. Harnden" Date: Thu, 7 Jun 2018 09:09:56 -0700 Subject: [PATCH] fixed xml 0.0 failing --- daemon/core/xml/xmlwriter0.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/daemon/core/xml/xmlwriter0.py b/daemon/core/xml/xmlwriter0.py index e7155ce8..d81005fe 100644 --- a/daemon/core/xml/xmlwriter0.py +++ b/daemon/core/xml/xmlwriter0.py @@ -370,18 +370,20 @@ class CoreDocumentWriter0(Document): """ # options options = self.createElement("SessionOptions") - defaults = self.session.options.getdefaultvalues() - for i, (k, v) in enumerate(self.session.options.getkeyvaluelist()): - if str(v) != str(defaults[i]): - xmlutils.add_text_param_to_parent(self, options, k, v) - # addparamtoparent(self, options, k, v) + defaults = self.session.options.default_values() + for name, current_value in self.session.options.get_configs().iteritems(): + default_value = defaults[name] + if current_value != default_value: + xmlutils.add_text_param_to_parent(self, options, name, current_value) + if options.hasChildNodes(): self.meta.appendChild(options) + # hook scripts self.addhooks() + # meta meta = self.createElement("MetaData") self.meta.appendChild(meta) - for k, v in self.session.metadata.items(): - xmlutils.add_text_param_to_parent(self, meta, k, v) - # addparamtoparent(self, meta, k, v) + for name, current_value in self.session.metadata.get_configs().iteritems(): + xmlutils.add_text_param_to_parent(self, meta, name, current_value)