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
|
event.get
|
||||||
|
|
||||||
def createNewDump(name, entity):
|
def createNewDump(name, entity):
|
||||||
#TODO Test si ya existe un dump anterior, si no, dumpear todo lo anterior
|
|
||||||
filePath = "./dumps/"+name+"Dump.json"
|
filePath = "./dumps/"+name+"Dump.json"
|
||||||
if os.path.isfile(filePath): return
|
if !os.path.isfile(filePath):
|
||||||
else:
|
|
||||||
with open(filePath,"w+") as f:
|
with open(filePath,"w+") as f:
|
||||||
meta = {'meta':[{
|
meta = {'meta':[{
|
||||||
'name': name,
|
'name': name,
|
||||||
@ -57,7 +55,7 @@ def createNewDump(name, entity):
|
|||||||
'creationDate': strftime("%Y-%m-%d %H:%M:%S", gmtime())
|
'creationDate': strftime("%Y-%m-%d %H:%M:%S", gmtime())
|
||||||
}]}
|
}]}
|
||||||
json.dump(meta, f)
|
json.dump(meta, f)
|
||||||
return
|
|
||||||
|
|
||||||
def addEntryToDump(name, element):
|
def addEntryToDump(name, element):
|
||||||
#TODO Test si existe el dump anterior
|
#TODO Test si existe el dump anterior
|
||||||
|
Loading…
Reference in New Issue
Block a user