Skip to content

Commit 96d78a9

Browse files
fix to_bytes() for Python < 3.11
1 parent b2ee837 commit 96d78a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pylibftdi/bitbang.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,5 @@ def port(self, value):
163163
self._latch = value
164164
if self.sync:
165165
self.flush_output()
166-
return super().write(value.to_bytes())
166+
# note to_bytes() gets these as default args in Python3.11+
167+
return super().write(value.to_bytes(1, "big"))

0 commit comments

Comments
 (0)