Skip to content

Commit d1faef6

Browse files
committed
Update pycatfile.py
1 parent dc1bc58 commit d1faef6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

pycatfile.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,6 +4183,11 @@ def ReadFileHeaderDataWithContent(fp, listonly=False, uncompress=True, skipcheck
41834183
fprejsoncontent = ""
41844184
fjsonrawcontent = fprejsoncontent
41854185
fjsoncontent = {}
4186+
elif(not testyaml and fjsontype == "yaml"):
4187+
fjsoncontent = {}
4188+
fprejsoncontent = fp.read(fjsonsize).decode("UTF-8")
4189+
fprejsoncontent = ""
4190+
fjsonrawcontent = fprejsoncontent
41864191
elif(fjsontype=="list"):
41874192
fprejsoncontent = fp.read(fjsonsize).decode("UTF-8")
41884193
flisttmp = MkTempFile()
@@ -4378,6 +4383,11 @@ def ReadFileHeaderDataWithContentToArray(fp, listonly=False, contentasfile=True,
43784383
fprejsoncontent = ""
43794384
fjsonrawcontent = fprejsoncontent
43804385
fjsoncontent = {}
4386+
elif(not testyaml and fjsontype == "yaml"):
4387+
fjsoncontent = {}
4388+
fprejsoncontent = fp.read(fjsonsize).decode("UTF-8")
4389+
fprejsoncontent = ""
4390+
fjsonrawcontent = fprejsoncontent
43814391
elif(fjsontype=="list"):
43824392
fprejsoncontent = fp.read(fjsonsize).decode("UTF-8")
43834393
flisttmp = MkTempFile()
@@ -4586,6 +4596,11 @@ def ReadFileHeaderDataWithContentToList(fp, listonly=False, contentasfile=False,
45864596
fprejsoncontent = ""
45874597
fjsonrawcontent = fprejsoncontent
45884598
fjsoncontent = {}
4599+
elif(not testyaml and fjsontype == "yaml"):
4600+
fjsoncontent = {}
4601+
fprejsoncontent = fp.read(fjsonsize).decode("UTF-8")
4602+
fprejsoncontent = ""
4603+
fjsonrawcontent = fprejsoncontent
45894604
elif(fjsontype=="list"):
45904605
fprejsoncontent = fp.read(fjsonsize).decode("UTF-8")
45914606
flisttmp = MkTempFile()

0 commit comments

Comments
 (0)