diff --git a/snakemake/rules.py b/snakemake/rules.py index e9b2671ef..fcd95abe7 100644 --- a/snakemake/rules.py +++ b/snakemake/rules.py @@ -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 ) )