Commit eed11c88 authored by M.S.M.Perera's avatar M.S.M.Perera

Edited jason file creation

parent cc31b869
...@@ -276,16 +276,17 @@ def PdfBreaker(gz_url): ...@@ -276,16 +276,17 @@ def PdfBreaker(gz_url):
if not lastExRun == None: if not lastExRun == None:
arrangeDictionary(listRuns, lastExRun, listTopics, arrangeDictionary(listRuns, lastExRun, listTopics,
listDescriptions, counter, dt, department, gnum, exType, firstRun, pubDate) # send date as well listDescriptions, counter, dt, department, gnum, exType, firstRun, pubDate) # send date as well
else: else:
dictTD = dt dictTD = dt
json_object = json.dumps(dictTD, indent=4) json_object = json.dumps(dictTD, indent=4)
if exType == 0: if exType == 1:
jsonFileName = 'gz-p-' + \ jsonFileName = 'gz-e-' + \
str(gnum) + ".json" str(gnum) + ".json"
with open('dumps/'+jsonFileName, "w") as outfile: with open('dumps/'+jsonFileName, "w") as outfile:
json.dump(dictTD, outfile) json.dump(dictTD, outfile)
elif exType == 1: elif exType == 0:
jsonFileName = 'gz-e-' + \ jsonFileName = 'gz-p-' + \
str(gnum) + ".json" str(gnum) + ".json"
with open('dumps/'+jsonFileName, "w") as outfile: with open('dumps/'+jsonFileName, "w") as outfile:
json.dump(dictTD, outfile) json.dump(dictTD, outfile)
......
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