Skip to content

Commit

Permalink
Update Application.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Apr 9, 2023
1 parent 1e32884 commit 31820aa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/OFS/Application.py
Expand Up @@ -365,16 +365,14 @@ def get_products():
[(priority, dir_name, index, base_dir), ...] for each Product directory
found, sort before returning """
products = []
i = 0
for product_dir in Products.__path__:
for index, product_dir in enumerate(Products.__path__):
product_names = os.listdir(product_dir)
for product_name in product_names:
if _is_package(product_dir, product_name):
# i is used as sort ordering in case a conflict exists
# between Product names. Products will be found as
# per the ordering of Products.__path__
products.append((0, product_name, i, product_dir))
i = i + 1
products.append((0, product_name, index, product_dir))
products.sort()
return products

Expand Down

0 comments on commit 31820aa

Please sign in to comment.