Skip to content

Commit 3823f87

Browse files
committed
Create a hitfix for an error when using --phase argument,
It will error out with TypeError: list indices must be integers or slices, not str That has now been fixed by using enumeration()
1 parent 1c916a9 commit 3823f87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/get_project_versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def write_to_csv_file(filename, version_list):
6565

6666
if args.phase:
6767
new_list = list()
68-
for version in sorted_version_list:
69-
if sorted_version_list['phase'] == phase_map[args.phase]:
68+
for idx, version in enumerate(sorted_version_list):
69+
if sorted_version_list[idx]['phase'] == phase_map[args.phase]:
7070
new_list.append(version)
7171
sorted_version_list = new_list
7272
if args.limit:

0 commit comments

Comments
 (0)