import-scripts: fix boolean rendering (#246)
This commit is contained in:
parent
27ff900fc3
commit
ba3fe60808
|
@ -540,13 +540,13 @@ def get_options(evaluation):
|
||||||
|
|
||||||
if value is None:
|
if value is None:
|
||||||
return "null"
|
return "null"
|
||||||
elif isinstance(value, int) or isinstance(value, float):
|
elif type(value) in [int, float]:
|
||||||
return str(value)
|
return str(value)
|
||||||
elif isinstance(value, bool):
|
elif type(value) == bool:
|
||||||
return "true" if value else "false"
|
return "true" if value else "false"
|
||||||
elif isinstance(value, list) and not value:
|
elif type(value) == list and not value:
|
||||||
return "[ ]"
|
return "[ ]"
|
||||||
elif isinstance(value, dict) and not value:
|
elif type(value) == dict and not value:
|
||||||
return "{ }"
|
return "{ }"
|
||||||
else:
|
else:
|
||||||
return jsonToNix(json.dumps(value))
|
return jsonToNix(json.dumps(value))
|
||||||
|
|
Loading…
Reference in a new issue