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

inspiral_lr: update for Param.from_pyvalue()

- .from_pyvalue() now supports None
parent 87322c26
No related branches found
No related tags found
No related merge requests found
......@@ -235,8 +235,7 @@ class LnLRDensity(snglcoinc.LnLRDensity):
def to_xml(self, name):
xml = super(LnLRDensity, self).to_xml(name)
# 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"template_ids", ",".join("%d" % template_id for template_id in sorted(self.template_ids)) if self.template_ids is not None else None))
# FIXME this is not an ideal way to get only one into the file
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))
......
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