summaryrefslogtreecommitdiffstats
path: root/Lib/binhex.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2007-08-29 17:26:34 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2007-08-29 17:26:34 (GMT)
commitda3f228740772a63ae41f3306a510eb6971dcd54 (patch)
tree69b9afe22a4b36c9a96b0477a6996d9742818147 /Lib/binhex.py
parentc4140a158eb19eeba540fd2ea72e95b97b6b0606 (diff)
downloadcpython-da3f228740772a63ae41f3306a510eb6971dcd54.zip
cpython-da3f228740772a63ae41f3306a510eb6971dcd54.tar.gz
cpython-da3f228740772a63ae41f3306a510eb6971dcd54.tar.bz2
Convert various string literals to bytes.
Diffstat (limited to 'Lib/binhex.py')
-rw-r--r--Lib/binhex.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/binhex.py b/Lib/binhex.py
index 4c53315..e4d551f 100644
--- a/Lib/binhex.py
+++ b/Lib/binhex.py
@@ -38,7 +38,7 @@ class Error(Exception):
# Various constants
REASONABLY_LARGE = 32768 # Minimal amount we pass the rle-coder
LINELEN = 64
-RUNCHAR = chr(0x90) # run-length introducer
+RUNCHAR = b"\x90"
#
# This code is no longer byte-order dependent
@@ -351,11 +351,11 @@ class _Rledecoderengine:
# otherwise: keep 1 byte.
#
mark = len(self.pre_buffer)
- if self.pre_buffer[-3:] == RUNCHAR + '\0' + RUNCHAR:
+ if self.pre_buffer[-3:] == RUNCHAR + b'\0' + RUNCHAR:
mark = mark - 3
elif self.pre_buffer[-1] == RUNCHAR:
mark = mark - 2
- elif self.pre_buffer[-2:] == RUNCHAR + '\0':
+ elif self.pre_buffer[-2:] == RUNCHAR + b'\0':
mark = mark - 2
elif self.pre_buffer[-2] == RUNCHAR:
pass # Decode all