Skip to content

Commit 1cf33bc

Browse files
committed
Fix bug in python
1 parent 874474c commit 1cf33bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/list-versions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def listVersions(source_path):
1616
line = ' '.join(f.readlines())
1717
version = re.search("version\([\'\"]([0-9]+(\.[0-9]+)*)[\'\"]", line)
1818
version_name = 'undefined' if version is None else version.group(1)
19-
recipes[product_name] = version_name
19+
products[product_name] = version_name
2020
print(products)
2121

2222
file_name = source_path + '/recipes.md'
@@ -25,7 +25,7 @@ def listVersions(source_path):
2525
md.write('**Below the last version of products contained in Spack recipes for this release.**\n')
2626
md.write('| Product | Version |\n')
2727
md.write('| ------- | ------- |\n')
28-
for product in products:
28+
for product in products.items():
2929
product_name = product[0]
3030
version = product[1]
3131
md.write('| ' + product_name + ' | ' + version + ' |\n')
@@ -36,7 +36,7 @@ def listVersions(source_path):
3636
with open(file_name, 'w') as md:
3737
md.write('#!/bin/bash\n\n')
3838
md.write('declare -A products\n')
39-
for product in products:
39+
for product in products.items():
4040
product_name = product[0]
4141
version = product[1]
4242
md.write('products[' + product_name + ']=' + version + '\n')

0 commit comments

Comments
 (0)