In DATAS, attribute stated by _ are ignored
This commit is contained in:
parent
387ecc7d5c
commit
07863d0718
|
@ -148,10 +148,11 @@ class ModuleState:
|
||||||
"""Serialize this node as a XML node"""
|
"""Serialize this node as a XML node"""
|
||||||
attribs = {}
|
attribs = {}
|
||||||
for att in self.attributes.keys():
|
for att in self.attributes.keys():
|
||||||
if isinstance(self.attributes[att], datetime):
|
if att[0] != "_": # Don't save attribute starting by _
|
||||||
attribs[att] = str(time.mktime(self.attributes[att].timetuple()))
|
if isinstance(self.attributes[att], datetime):
|
||||||
else:
|
attribs[att] = str(time.mktime(self.attributes[att].timetuple()))
|
||||||
attribs[att] = str(self.attributes[att])
|
else:
|
||||||
|
attribs[att] = str(self.attributes[att])
|
||||||
attrs = xml.sax.xmlreader.AttributesImpl(attribs)
|
attrs = xml.sax.xmlreader.AttributesImpl(attribs)
|
||||||
|
|
||||||
gen.startElement(self.name, attrs)
|
gen.startElement(self.name, attrs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user