From f013f157a24f607377ca3a7b02a5feaed6fd9ca8 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 14 Sep 2022 16:05:43 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E9=98=BF=E9=87=8C=E4=BA=91=E4=B8=BB=E6=9C=BA=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/host/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/host/utils.py b/spug_api/apps/host/utils.py index cbd99bc..2dec266 100644 --- a/spug_api/apps/host/utils.py +++ b/spug_api/apps/host/utils.py @@ -122,7 +122,7 @@ def fetch_ali_instances(ak, ac, region_id, page_number=1): instance_charge_type=check_instance_charge_type(item['InstanceChargeType'], 'ali'), internet_charge_type=check_internet_charge_type(item['InternetChargeType'], 'ali'), public_ip_address=item['PublicIpAddress']['IpAddress'], - private_ip_address=list(map(lambda x: x['PrimaryIpAddress'], network_interface)), + private_ip_address=[x['PrimaryIpAddress'] for x in network_interface if x.get('PrimaryIpAddress')], zone_id=item['ZoneId'] ) if len(res['Instances']['Instance']) == page_size: