Commit 8803586
committed
usb-device-cdc: Fix default timeout in CDCInterface.init().
CDCInterface.__init__() sets self._timeout = 1000, then calls
self.init(**kwargs). The init() method had timeout=None as default,
which unconditionally overwrites self._timeout with None. This causes
TypeError in read(), write(), readinto(), and ioctl() which all compare
int >= self._timeout.
Set the default timeout=1000 in init() to match the intended default,
consistent with how other parameters (baudrate, bits, etc.) have their
defaults specified directly in the init() signature.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>1 parent 6ae440a commit 8803586
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments