mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-08 05:08:45 +08:00
simplify RIDA_CONFIG handling
This commit is contained in:
5
rida.py
5
rida.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user