Skip to content

Commit 4fd6ada

Browse files
tyrublueyed
authored andcommitted
Fix None access exception
When empty entry in config like this: ``` policies: ``` vint always raises an exception. ``` AttributeError: 'NoneType' object has no attribute 'keys' ```
1 parent 1937372 commit 4fd6ada

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vint/linting/config/config_container.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ def merge_dict_deeply(posterior, prior):
77
# type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
88
tmp = {}
99

10+
if posterior is None:
11+
posterior = {}
1012
for key in set(posterior.keys()) | set(prior.keys()):
1113
if key in prior:
1214
if isinstance(prior[key], dict):

0 commit comments

Comments
 (0)