Skip to content
Snippets Groups Projects
Commit b0ce2e5a authored by Julian Rother's avatar Julian Rother
Browse files

Fix debug mode detection for default config

parent 0690d180
Branches
Tags
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
from server import * from server import *
global is_debug
is_debug = True
if __name__ == '__main__': if __name__ == '__main__':
app.run(threaded=True) app.run(threaded=True)
...@@ -4,6 +4,7 @@ from functools import wraps ...@@ -4,6 +4,7 @@ from functools import wraps
from datetime import date, timedelta, datetime, time, MINYEAR from datetime import date, timedelta, datetime, time, MINYEAR
import threading import threading
import os import os
import sys
import hashlib import hashlib
import random import random
...@@ -24,7 +25,7 @@ timer.start() ...@@ -24,7 +25,7 @@ timer.start()
config = app.config config = app.config
config.from_pyfile('config.py.example', silent=True) config.from_pyfile('config.py.example', silent=True)
if 'is_debug' in globals(): if not sys.argv[0].endswith('run.py'):
config['SQLITE_INIT_DATA'] = False config['SQLITE_INIT_DATA'] = False
config['DEBUG'] = False config['DEBUG'] = False
config.from_pyfile('config.py', silent=True) config.from_pyfile('config.py', silent=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment