Source: pyserial
Version: 2.6-1.1
Severity: normal
Tags: patch upstream fixed-upstream
Hello,
I was biten by a bug that is already reported upstream on
http://sourceforge.net/p/pyserial/bugs/166/
.. It was fixed in the upstream svn repository in r495. Attached is a
patch.
Best regards
Uwe
-- System Information:
Debian Release: 8.1
APT prefers proposed-updates
APT policy: (900, 'proposed-updates'), (900, 'stable'), (600, 'unstable'),
(500, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
From: Chris Liechti <[email protected]>
Subject: [Bug pyserial:166] RFC2217 connections always fail
Origin: http://sourceforge.net/p/pyserial/code/495/
Bug: http://sourceforge.net/p/pyserial/bugs/166/
--- a/serial/rfc2217.py
+++ b/serial/rfc2217.py
@@ -429,7 +429,7 @@
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)