You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/09/04 18:21:15 UTC

[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #3691: Some best-practices updates to the kickstart script

rawlinp commented on a change in pull request #3691: Some best-practices updates to the kickstart script
URL: https://github.com/apache/trafficcontrol/pull/3691#discussion_r320900012
 
 

 ##########
 File path: misc/kickstart_create_network_line.py
 ##########
 @@ -215,12 +222,12 @@ def useable_interfaces(net_devs, nc, iface_speed):
         IPV6_DEFAULTGW:" 2001:0db8:0a0b:12f0:0000:0000:0000:0001",
         BONDING_OPTS:"miimon=100 mode=4 lacp_rate=fast xmit_hash_policy=layer3+4",
         DHCP:"no" }
-# This should be set to no in the config file, but that could change: 
-if not nc.has_key('DHCP'):
+# This should be set to no in the config file, but that could change:
+if "DHCP" not in nc:
     nc['DHCP']='no'
 
-# This should be set to no in the config file, but that could change: 
-if not nc.has_key('DHCP'):
+# This should be set to no in the config file, but that could change:
+if "DHCP" not in nc:
     nc['DHCP']='no'
 
 Review comment:
   This `if` block seems to be duplicated. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services