Skip to content


Browse files Browse the repository at this point in the history
fix: Initialize assignments dictionary when setting rule-based resour…
…ces (#1154)

* Fix issue #1080

Initialize assignments[rule] dictionary

* Use defaultdict to initialize assignments

* Add space after import
  • Loading branch information
percyfal committed Aug 27, 2021
1 parent 1803f0b commit 68c13fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snakemake/
Expand Up @@ -817,7 +817,9 @@ def parse_set_resources(args):
"VALUE being a positive integer or a string."

assignments = dict()
from collections import defaultdict

assignments = defaultdict(dict)
if args.set_resources is not None:
for entry in args.set_resources:
key, value = parse_key_value_arg(entry, errmsg=errmsg)
Expand Down

0 comments on commit 68c13fd

Please sign in to comment.