Skip to content

Commit a67b3cc

Browse files
committed
Make flask app config file optional
1 parent 1d36970 commit a67b3cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

servicex_codegen/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def create_app(test_config=None, provided_translator=None):
5656
except OSError:
5757
pass
5858

59-
if not test_config:
60-
app.config.from_envvar('APP_CONFIG_FILE')
61-
else:
59+
if test_config:
6260
app.config.from_mapping(test_config)
61+
elif 'APP_CONFIG_FILE' in os.environ:
62+
app.config.from_envvar('APP_CONFIG_FILE')
6363

6464
with app.app_context():
6565
translator = provided_translator

0 commit comments

Comments
 (0)