فهرست منبع

Fix variable names to avoid infinite loop

Enis Afgan 9 سال پیش
والد
کامیت
19bb9d1281
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      cloudbridge/cloud/providers/aws/services.py

+ 2 - 2
cloudbridge/cloud/providers/aws/services.py

@@ -540,12 +540,12 @@ class AWSInstanceService(BaseInstanceService):
             # Try to get a subnet via specified SGs. This will work only if
             # Try to get a subnet via specified SGs. This will work only if
             # the specified SGs are within a VPC (which is a prerequisite to
             # the specified SGs are within a VPC (which is a prerequisite to
             # launch into VPC anyhow).
             # launch into VPC anyhow).
-            sg_ids = self._process_security_groups(security_groups, vpc_id)
+            _sg_ids = self._process_security_groups(security_groups, vpc_id)
             # Must iterate through all the SGs here because a SG name may
             # Must iterate through all the SGs here because a SG name may
             # exist in a VPC or EC2-Classic so opt for the VPC SG. This
             # exist in a VPC or EC2-Classic so opt for the VPC SG. This
             # applies in the case no subnet was specified.
             # applies in the case no subnet was specified.
             if not subnet_id:
             if not subnet_id:
-                for sg_id in sg_ids:
+                for sg_id in _sg_ids:
                     sg = self.provider.security.security_groups.get(sg_id)
                     sg = self.provider.security.security_groups.get(sg_id)
                     if sg._security_group.vpc_id:
                     if sg._security_group.vpc_id:
                         if sg_ids and sg_id not in sg_ids:
                         if sg_ids and sg_id not in sg_ids: