Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor candidate 2 #75

Merged
merged 107 commits into from May 1, 2018

Conversation

Projects
None yet
2 participants
@strictlymike
Copy link
Contributor

strictlymike commented Apr 16, 2018

Unified packet processing code for Windows and Linux

@strictlymike strictlymike requested a review from tankbusta Apr 16, 2018

@tankbusta
Copy link
Member

tankbusta left a comment

I was basically looking for things to comment on...

cfds = False if winders else True
shl = False if winders else True
cflags = DETACHED_PROCESS if self.running_on_windows else 0
cfds = False if self.running_on_windows else True

This comment has been minimized.

@tankbusta

tankbusta Apr 16, 2018

Member

You don't have to change this but apparently this is also possible (I didn't know until now)

cfds = not self.running_on_windows
def fmtCsumData(self, sep='/'):
if self._is_ip:
return '%s %s %s ' % (self.fmtL3Csums(), sep, self.fmtL4Csums())
else:

This comment has been minimized.

@tankbusta

tankbusta Apr 16, 2018

Member

This else can be removed

if proto_name and ip and port:
return self._linux_find_sock_by_endpoint_unsafe(ipver, proto_name,
ip, port, local)
else:

This comment has been minimized.

@tankbusta

tankbusta Apr 16, 2018

Member

This can be removed

except WindowsError as e:
if e.winerror in [4,6,995]:
if e.winerror in [4, 6, 995]:
return
else:

This comment has been minimized.

@tankbusta

tankbusta Apr 16, 2018

Member

This can be removed

@strictlymike

This comment has been minimized.

Copy link
Contributor Author

strictlymike commented May 1, 2018

Thanks for taking the time to look closely. In the interest of not further blocking progress on other tickets, I'm going to continue the merge, but I've added your comments to my file of code quality issues and am going to add a code quality project to my roadmap.

@strictlymike strictlymike merged commit e54c737 into master May 1, 2018

@strictlymike strictlymike deleted the refactor-candidate-2 branch Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.