create peers folder if needed
This commit is contained in:
parent
c05ceaf175
commit
2d9f5446dc
1 changed files with 3 additions and 0 deletions
|
@ -602,6 +602,9 @@ def migrate_13():
|
||||||
import json
|
import json
|
||||||
path = os.path.join(settings.data_path, 'peers', '%s.log' % settings.USER_ID)
|
path = os.path.join(settings.data_path, 'peers', '%s.log' % settings.USER_ID)
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
|
folder = os.path.dirname(path)
|
||||||
|
if not os.path.exists(folder):
|
||||||
|
os.makedirs(folder)
|
||||||
with db.session() as session:
|
with db.session() as session:
|
||||||
revision = -1
|
revision = -1
|
||||||
qs = changelog.Changelog.query.filter_by(user_id=settings.USER_ID)
|
qs = changelog.Changelog.query.filter_by(user_id=settings.USER_ID)
|
||||||
|
|
Loading…
Reference in a new issue