Fix config.local.py in tasks

Follow up from b95e4468 in tasks.py
This commit is contained in:
Max Meinhold 2020-12-31 18:44:06 -05:00
parent 778a5c3f8e
commit b02c6bfbc9
No known key found for this signature in database
GPG key ID: 00B8B1017EEC103F

View file

@ -27,8 +27,8 @@ from proxstar.vnc import send_stop_ssh_tunnel
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO)
app = Flask(__name__)
if os.path.exists(os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config.local.py')):
config = os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config.local.py')
if os.path.exists(os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config_local.py')):
config = os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config_local.py')
else:
config = os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config.py')
app.config.from_pyfile(config)