Repository navigation
Here are a few fixes utils.network - #31196
Conversation
sakateka
commented
Feb 13, 2016
- not use lsof if proc is available
- support invert options of hex2ip for ipv6
- not issue an error if lsof does not find the TCP sessions
| ip_part = [ip_part[x:x + 2] for x in range(0, 8, 2)] | ||
| ip.append("{0[3]}{0[2]}:{0[1]}{0[0]}".format(ip_part)) | ||
| if invert: | ||
| ip.append("{0[3]}{0[2]}:{0[1]}{0[0]}".format(ip_part)) |
There was a problem hiding this comment.
Given that the default for invert is False, doesn't this imply a change in behavior here? Is this a bug fix or was this unintentional?
There was a problem hiding this comment.
Hi!
I looked at all of the code and all calls made with hex2ip invert=True, these changes simply retain the previous agreement of the call hex2ip.
I do not know the original intentions of the author of the hex2ip but it is my opinion that the setting invert can be removed together with the excess code.
There was a problem hiding this comment.
Sounds good. Just wanted to make sure we covered our bases there. Thanks for the reply.
|
Hi @sakateka I just had on question in here that I asked in-line to the PR. If you could take a look and just help ease my mind, we can go from there. Thanks! |
Here are a few fixes utils.network