simplify RIDA_CONFIG handling

This commit is contained in:
Karsten Hopp
2016-07-22 12:58:25 +02:00
parent 64615a3583
commit e668233bb4

View File

@@ -46,8 +46,9 @@ import tempfile
app = Flask(__name__)
app.config.from_envvar("RIDA_SETTINGS", silent=True)
if os.environ.get('RIDA_CONFIG') and os.path.isfile(os.environ.get('RIDA_CONFIG')):
conf = rida.config.from_file(os.environ.get('RIDA_CONFIG'))
ridaconfig=os.environ.get('RIDA_CONFIG')
if ridaconfig:
conf = rida.config.from_file(ridaconfig)
else:
conf = rida.config.from_file("rida.conf")
rida.logger.init_logging(conf)