From 0614cee9b25801aac03a89e6137140528e16e67d Mon Sep 17 00:00:00 2001 From: KenF Date: Thu, 22 Jan 2026 17:32:31 +0800 Subject: [PATCH] fix: corrected os platform in ec2 inventory --- aws-ec2.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aws-ec2.py b/aws-ec2.py index a317cfe..0856a91 100755 --- a/aws-ec2.py +++ b/aws-ec2.py @@ -27,10 +27,7 @@ def printResources(region_name: str) -> list[list[str | int]]: if tag['Key'] == "Name": name_tag = tag['Value'] break - osPlatform = "Linux" - if i.get('Platform') == "Windows": - osPlatform = "Windows" - return_data.append([i['InstanceId'], name_tag, osPlatform, i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']]) + return_data.append([i['InstanceId'], name_tag, i.get('PlatformDetails'), i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']]) return return_data # Main function