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 2020/01/10 22:57:01 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4286: Fixed wrong import order and Py3-incompatibility

ocket8888 commented on a change in pull request #4286: Fixed wrong import order and Py3-incompatibility
URL: https://github.com/apache/trafficcontrol/pull/4286#discussion_r365463093
 
 

 ##########
 File path: misc/kickstart_create_network_line.py
 ##########
 @@ -170,8 +170,7 @@ def useable_interfaces(net_devs, nc, iface_speed):
         #  if not it is anyway.
         # Thus we are doing a bond of some sort.
         # This gives us the fastest interfaces first:
-        speeds = net_devs.keys()
-        speeds.sort(reverse=True)
+        speeds = [k for k in sorted(net_devs.keys(), reverse=True)]
 
 Review comment:
   That was the Python3 compatibility error! (`dict_keys` has no member `sort`)

----------------------------------------------------------------
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