nada formado (1)

This commit is contained in:
Julio Diez de Revenga 2019-10-15 21:35:45 +02:00
parent 3918db58cc
commit 6334104213
1 changed files with 2 additions and 4 deletions

View File

@ -46,10 +46,8 @@ def handler(events):
event.get
def createNewDump(name, entity):
#TODO Test si ya existe un dump anterior, si no, dumpear todo lo anterior
filePath = "./dumps/"+name+"Dump.json"
if os.path.isfile(filePath): return
else:
if !os.path.isfile(filePath):
with open(filePath,"w+") as f:
meta = {'meta':[{
'name': name,
@ -57,7 +55,7 @@ def createNewDump(name, entity):
'creationDate': strftime("%Y-%m-%d %H:%M:%S", gmtime())
}]}
json.dump(meta, f)
return
def addEntryToDump(name, element):
#TODO Test si existe el dump anterior