summaryrefslogtreecommitdiff
path: root/pyserial/serial/serialutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyserial/serial/serialutil.py')
-rw-r--r--pyserial/serial/serialutil.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyserial/serial/serialutil.py b/pyserial/serial/serialutil.py
index ee115e6..e568aa1 100644
--- a/pyserial/serial/serialutil.py
+++ b/pyserial/serial/serialutil.py
@@ -25,6 +25,10 @@ except (NameError, AttributeError):
list.append(self, item)
else:
list.append(self, chr(item))
+
+# create control bytes, depending on true type of bytes
+# all Python versions prior 3.x convert str([17]) to '[17]' instead of '\x11'
+if bytes is str:
XON = chr(17)
XOFF = chr(19)
else: