nada formado (1)
This commit is contained in:
parent
3918db58cc
commit
6334104213
6
main.py
6
main.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user