From c00ef647297d5706e533334eea28fcb00cc461db Mon Sep 17 00:00:00 2001 From: cliechti Date: Thu, 31 Jul 2014 15:29:34 +0000 Subject: [Bug pyserial:166] RFC2217 connections always fail git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@495 f19166aa-fa4f-0410-85c2-fa1106f25c8a --- CHANGES.txt | 6 ++++++ serial/rfc2217.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6c2d478..da3f6df 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -476,3 +476,9 @@ Bugfixes (win32): - [Bug pyserial:152] Cannot configure port, some setting was wrong. Can leave port handle open but port not accessible +Version 2.8 2014-xx-xx +--------------------------- + +Bugfixes: + +- [Bug pyserial:166] RFC2217 connections always fail diff --git a/serial/rfc2217.py b/serial/rfc2217.py index 2012ea7..3781ac6 100644 --- a/serial/rfc2217.py +++ b/serial/rfc2217.py @@ -442,7 +442,7 @@ class RFC2217Serial(SerialBase): timeout_time = time.time() + self._network_timeout while time.time() < timeout_time: time.sleep(0.05) # prevent 100% CPU load - if sum(o.active for o in mandadory_options) == len(mandadory_options): + if sum(o.active for o in mandadory_options) == sum(o.state != INACTIVE for o in mandadory_options): break else: raise SerialException("Remote does not seem to support RFC2217 or BINARY mode %r" % mandadory_options) -- cgit v1.2.1