]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
IPSet Manager: make code more pythonic
authorGary Kotton <gkotton@vmware.com>
Sun, 1 Nov 2015 12:29:13 +0000 (04:29 -0800)
committerGary Kotton <gkotton@vmware.com>
Sun, 1 Nov 2015 12:29:47 +0000 (04:29 -0800)
Remove unnecessary brackets.

TrivialFix

Change-Id: I34e29a9911be9731bc9f4b2d7f3b055e4b85a438

neutron/agent/linux/ipset_manager.py

index 86c5d87608d86e33b1f414f4cb1def6dc3ecc4da..ca1172057516a9c80e0253a7b4019bf1a6abd2f2 100644 (file)
@@ -46,11 +46,11 @@ class IpsetManager(object):
         sanitized_addresses = []
         for ip in addresses:
             ip = netaddr.IPNetwork(ip)
-            if (ip.prefixlen == 0):
-                if(ip.version == 4):
+            if ip.prefixlen == 0:
+                if ip.version == 4:
                     sanitized_addresses.append('0.0.0.0/1')
                     sanitized_addresses.append('128.0.0.0/1')
-                elif (ip.version == 6):
+                elif ip.version == 6:
                     sanitized_addresses.append('::/1')
                     sanitized_addresses.append('8000::/1')
             else: