Skip to content

Commit aa7c272

Browse files
committed
updated better logging
1 parent d5d3ee8 commit aa7c272

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/rest/connector/libs/ise/implementation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ def connect(self,
119119
version_info = version_request.response
120120
# {'OperationResult': {'resultValue': [
121121
# {'value': '3.3.0.430', 'name': 'version'}, {'value': '0', 'name': 'patch information'}]}}
122-
version_info_list = version_info.get('OperationResult', {}).get('resultValue', [])
122+
# Check if version_info is a dictionary
123+
if isinstance(version_info, dict):
124+
# Proceed with accessing the version information
125+
version_info_list = version_info.get('OperationResult', {}).get('resultValue', [])
126+
else:
127+
# Raise an appropriate error if version_info is not a dictionary
128+
raise TypeError(f"Expected version_info to be a dictionary, but received {version_info}")
123129
version_message_list = []
124130
for version_nv in version_info_list:
125131
name = version_nv.get('name')

0 commit comments

Comments
 (0)