From 8abbf293cbfee8007be4f4276673494a05a16067 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 28 Jan 2022 09:10:45 +0800 Subject: [PATCH] Fix wrong parameter in get_part_resources() The assertion error for `get_part_resources()` should print `res_mapping` instead of `part_mapping` (which is not defined in this function). Signed-off-by: Steve --- prjxray/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prjxray/util.py b/prjxray/util.py index 6c285795e..3f717d3a0 100644 --- a/prjxray/util.py +++ b/prjxray/util.py @@ -64,7 +64,7 @@ def get_part_resources(file_path, part): with open(filename, 'r') as stream: res_mapping = yaml.load(stream, Loader=yaml.FullLoader) res = res_mapping.get(part, None) - assert res, "Part {} not found in {}".format(part, part_mapping) + assert res, "Part {} not found in {}".format(part, res_mapping) return res