Commit e95ebbaa authored by Kipp Cannon's avatar Kipp Cannon

param.py: support None in .from_pyvalue()

parent f51a873d
Pipeline #36310 failed with stages
in 3 minutes and 22 seconds
......@@ -196,7 +196,9 @@ class Param(ligolw.Param):
element from an instance of a Python builtin type. See
.build() for a description of the valid keyword arguments.
"""
return cls.build(name, ligolwtypes.FromPyType[type(value)], value, **kwargs)
if value is not None:
return cls.build(name, ligolwtypes.FromPyType[type(value)], value, **kwargs)
return cls.build(name, None, None, **kwargs)
@classmethod
def getParamsByName(cls, elem, name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment