This commit is contained in:
j 2017-08-19 18:19:59 +02:00
parent fa22ee34de
commit 58f516ff46

View file

@ -8,7 +8,7 @@ import json
import sqlalchemy as sa
from sqlalchemy.sql.expression import text
from utils import datetime2ts, ts2datetime, make_folder
from utils import datetime2ts, ts2datetime, makefolder
from websocket import trigger_event
import db
import settings
@ -46,7 +46,7 @@ def add_record(action, *args, **kwargs):
else:
mode = 'w'
state.changelog_size = 0
make_folder(path)
makefolder(path)
with open(path, mode) as fd:
fd.write(data + '\n')
state.changelog_size = os.path.getsize(path)