forked from orbit-oss/flask
Discover app factory deterministically
Commit 2ae740dd49 probably inadvertently
changed to iterate over a set of "create_app", "make_app" to discover
application factory functions. As sets don't guarantee order,
differences in the implementation of the type can make it
non-deterministic which factory function is used if a project implements
both. Revert to using a tuple.
Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
1a9059dd3a
commit
cf3089a8f8
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ def find_best_app(script_info, module):
|
|||
)
|
||||
|
||||
# Search for app factory functions.
|
||||
for attr_name in {"create_app", "make_app"}:
|
||||
for attr_name in ("create_app", "make_app"):
|
||||
app_factory = getattr(module, attr_name, None)
|
||||
|
||||
if inspect.isfunction(app_factory):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue