mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-23 01:16:18 +00:00
Fix handling of missing config file
This commit is contained in:
parent
24cbf47f31
commit
3e89c102e9
8
main.py
8
main.py
@ -1,8 +1,7 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
from web import app
|
import config
|
||||||
import db, config
|
import os.path, sys
|
||||||
import os.path
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if not config.check():
|
if not config.check():
|
||||||
@ -12,6 +11,9 @@ if __name__ == '__main__':
|
|||||||
if not os.path.exists(config.get('CACHE_DIR')):
|
if not os.path.exists(config.get('CACHE_DIR')):
|
||||||
os.makedirs(config.get('CACHE_DIR'))
|
os.makedirs(config.get('CACHE_DIR'))
|
||||||
|
|
||||||
|
import db
|
||||||
|
from web import app
|
||||||
|
|
||||||
db.init_db()
|
db.init_db()
|
||||||
app.run(debug = True)
|
app.run(debug = True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user