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

socket:// support on Windows #74

Open
alterscape opened this issue Aug 25, 2021 · 1 comment
Open

socket:// support on Windows #74

alterscape opened this issue Aug 25, 2021 · 1 comment

Comments

@alterscape
Copy link

I've made a small change to a local checkout to support socket:// connections (for the purpose of building a fake for testing when hardware is not available/connected):

in _poll_write() (line 304 in master as of 25 AUG 2021), the attempt to read self.serial.out_waiting fails with an AttributeError because the Socket transport does not implement out_waiting.

I wrapped the call as follows:

try:
  if serial.out_waiting < self.max_out_waiting:
    self._write_ready()
except AttributeError:
   self.write_ready()

This seems to fix the issue with socket:// connections and doesn't break other usage, because if out_waiting exists the check runs as implemented.

If this is acceptable I can submit a pull request -- I'd like to get this upstream so my team doesn't need to maintain a fork!

@Hedda
Copy link

Hedda commented Nov 12, 2021

If this is acceptable I can submit a pull request -- I'd like to get this upstream so my team doesn't need to maintain a fork!

Suggest that you submit a pull request for this and just wait for feedback and easier to comment on code in a PR than an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants