diff --git a/salt/modules/boto_vpc.py b/salt/modules/boto_vpc.py
index <HASH>..<HASH> 100644
--- a/salt/modules/boto_vpc.py
+++ b/salt/modules/boto_vpc.py
@@ -1421,11 +1421,11 @@ def delete_nat_gateway(nat_gateway_id,
         # wait for deleting nat gateway to finish prior to attempt to release elastic ips
         if wait_for_delete:
             for retry in range(wait_for_delete_retries, 0, -1):
-                gwinfo = conn3.describe_nat_gateways(NatGatewayIds=[nat_gateway_id])
-                if gwinfo:
-                    gw = gwinfo.get('NatGateways', [None])[0]
-                    if gw and gw['State'] not in ['deleted', 'failed']:
-                        time.sleep((2 ** (wait_for_delete_retries - retry)) + (random.randint(0, 1000) / 1000))
+                if gwinfo and gwinfo['State'] not in ['deleted', 'failed']:
+                    time.sleep((2 ** (wait_for_delete_retries - retry)) + (random.randint(0, 1000) / 1000))
+                    gwinfo = conn3.describe_nat_gateways(NatGatewayIds=[nat_gateway_id])
+                    if gwinfo:
+                        gwinfo = gwinfo.get('NatGateways', [None])[0]
                         continue
                 break
fixed a bug in retry mechanism.