Skip to content

Commit 21547a8

Browse files
committed
fixes issue with parsing of vm guest data #448
1 parent aa27733 commit 21547a8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

module/sources/vmware/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2188,11 +2188,14 @@ def add_virtual_machine(self, obj):
21882188
if isinstance(detailed_data, str):
21892189
detailed_data_dict = dict()
21902190
for detailed_data_item in quoted_split(detailed_data.replace("' ", "', ")):
2191+
if "=" not in detailed_data_item:
2192+
continue
2193+
21912194
detailed_data_key, detailed_data_value = detailed_data_item.split("=")
21922195
detailed_data_dict[detailed_data_key] = detailed_data_value.strip("'")
21932196
if len(detailed_data_dict.get("prettyName","")) > 0:
21942197
platform = detailed_data_dict.get("prettyName")
2195-
if detailed_data_dict.get("prettyName").lower() == "linux" and \
2198+
if detailed_data_dict.get("familyName", "").lower() == "linux" and \
21962199
detailed_data_dict.get("distroVersion") not in platform:
21972200
platform = f'{platform} {detailed_data_dict.get("distroVersion")}'
21982201

0 commit comments

Comments
 (0)