Skip to content
Permalink
Browse files
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 68c13fd6fb2ad458e79bafe146499b601bf4bd0e
Showing 1 changed file with 3 additions and 1 deletion.
@@ -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)

0 comments on commit 68c13fd

Please sign in to comment.