-
Notifications
You must be signed in to change notification settings - Fork 352
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed
except WindowsError as e: | ||
if e.winerror in [4,6,995]: | ||
if e.winerror in [4, 6, 995]: | ||
return | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed
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. |
Unified packet processing code for Windows and Linux