Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't raise WorkflowError when entry is empty #1368

Merged
merged 1 commit into from Feb 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions snakemake/rules.py
Expand Up @@ -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
Expand All @@ -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
)
)
Expand Down