Skip to content

Commit 91e90d7

Browse files
_user_attributes TypeError: len() - look for None before checking len (#1054)
1 parent a0aabcb commit 91e90d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/python/wlsdeploy/tool/util/default_authenticator_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _user_attributes(self, user_mapping_section, user_attributes):
133133
:return: template
134134
"""
135135
hash_entry = list()
136-
if len(user_attributes) == 0:
136+
if user_attributes is None or len(user_attributes) == 0:
137137
return
138138

139139
for attribute in user_attributes:
@@ -170,7 +170,7 @@ def _build_user_mapping_hash(self, user_mapping_section, name):
170170
hash_entry[HASH_GROUPS] = group_list
171171
attribute_folder = dictionary_utils.get_element(group_attributes, USER_ATTRIBUTES)
172172
dict_hash = self._user_attributes(user_mapping_section, attribute_folder)
173-
if len(dict_hash) > 0:
173+
if dict_hash is not None and len(dict_hash) > 0:
174174
hash_entry[HASH_ATTRIBUTES] = dict_hash
175175
return hash_entry
176176

0 commit comments

Comments
 (0)