Skip to content
Permalink
Browse files
fix: don't raise WorkflowError when entry is empty (#1368)
- Modify function 'check_output_duplicates' to check for empty value
  - Complete docstring
  - Add period at the end of raise message
  - Closes #1367
  • Loading branch information
vinisalazar committed Feb 5, 2022
1 parent 6200652 commit 1fc6f7b5d7e7d7f40baab961db89c4b59c950bf7
Showing 1 changed file with 3 additions and 3 deletions.
@@ -434,7 +434,7 @@ def set_output(self, *output, **kwoutput):

def check_output_duplicates(self):
"""Check ``Namedlist`` for duplicate entries and raise a ``WorkflowError``
on problems.
on problems. Does not raise if the entry is empty.
"""
seen = dict()
idx = None
@@ -444,10 +444,10 @@ def check_output_duplicates(self):
idx = 0
else:
idx += 1
if value in seen:
if value and value in seen:
raise WorkflowError(
"Duplicate output file pattern in rule {}. First two "
"duplicate for entries {} and {}".format(
"duplicate for entries {} and {}.".format(
self.name, seen[value], name or idx
)
)

0 comments on commit 1fc6f7b

Please sign in to comment.