Skip to content

Commit 2ef17bd

Browse files
committed
fix _get_item_comments for Python 3: items() is a generator, force it into a list
1 parent 4323870 commit 2ef17bd

File tree

1 file changed

+2
-2
lines changed
  • easybuild/framework/easyconfig/format

1 file changed

+2
-2
lines changed

easybuild/framework/easyconfig/format/one.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ def _get_item_comments(self, key, val):
231231
"""Get per-item comments for specified parameter name/value."""
232232
item_comments = {}
233233

234-
cand_above_comments = self.comments['iterabove'].get(key, {}).items()
235-
cand_above_comments.extend(self.comments['above'].items())
234+
cand_above_comments = list(self.comments['iterabove'].get(key, {}).items())
235+
cand_above_comments.extend(list(self.comments['above'].items()))
236236

237237
for comment_key, comment_val in cand_above_comments:
238238
if str(val) in comment_key:

0 commit comments

Comments
 (0)