10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 09:56:08 +02:00

Use json.dumps instead of str().lower to write boolean

This commit is contained in:
Mickaël Véril 2020-04-30 16:06:46 +02:00
parent 79e1d008c0
commit 1be87533ba

View File

@ -7,6 +7,7 @@ from enum import IntEnum,auto,unique,IntFlag
from .Format import Format from .Format import Format
import re import re
import numpy as np import numpy as np
import json
class state: class state:
def __init__(self,number, multiplicity, symetry): def __init__(self,number, multiplicity, symetry):
@ -294,7 +295,7 @@ class dataFileBase(object):
str(ex.value) if ex.value is not None else "_", str(ex.value) if ex.value is not None else "_",
str(ex.T1) if ex.T1 is not None else "_", str(ex.T1) if ex.T1 is not None else "_",
str(ex.oscilatorForces) if ex.oscilatorForces is not None else "_", str(ex.oscilatorForces) if ex.oscilatorForces is not None else "_",
str(ex.isUnsafe).lower()) json.dumps(ex.isUnsafe))
f.write(mystr) f.write(mystr)
class method: class method:
def __init__(self,name, *args): def __init__(self,name, *args):