Skip to content

Commit 65c967d

Browse files
authored
Merge pull request avocado-framework#6130 from wangp-h/master
Fix bug in recursive_compare_dict: Initialize diff_btw_dict if None.
2 parents 7994f5a + ab85354 commit 65c967d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

avocado/utils/data_structures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ def recursive_compare_dict(dict1, dict2, level="DictKey", diff_btw_dict=None):
152152
153153
:rtype: list or None
154154
"""
155+
if diff_btw_dict is None:
156+
diff_btw_dict = []
155157
if isinstance(dict1, dict) and isinstance(dict2, dict):
156158
if dict1.keys() != dict2.keys():
157159
set1 = set(dict1.keys())

0 commit comments

Comments
 (0)