Skip to content
Snippets Groups Projects
Commit 12b270e8 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

inspiral_lr: fix writing empty template_id set

- Param elements now do support None, but not via the .from_pyvalue() method, yet, only via the .build() method.
parent d9a6fd16
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -198,7 +198,8 @@ class LnLRDensity(snglcoinc.LnLRDensity):
def to_xml(self, name):
xml = super(LnLRDensity, self).to_xml(name)
xml.appendChild(ligolw_param.Param.from_pyvalue(u"template_ids", ",".join("%d" % template_id for template_id in sorted(self.template_ids)) if self.template_ids is not None else None))
# FIXME: switch to .from_pyvalue() when it can accept None
xml.appendChild(ligolw_param.Param.build(u"template_ids", u"lstring", ",".join("%d" % template_id for template_id in sorted(self.template_ids)) if self.template_ids is not None else None))
xml.appendChild(ligolw_param.Param.from_pyvalue(u"instruments", lsctables.instrumentsproperty.set(self.instruments)))
xml.appendChild(ligolw_param.Param.from_pyvalue(u"min_instruments", self.min_instruments))
xml.appendChild(ligolw_param.Param.from_pyvalue(u"delta_t", self.delta_t))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment