summaryrefslogtreecommitdiff
path: root/rsa/varblock.py
diff options
context:
space:
mode:
authorYesudeep Mangalapilly <yesudeep@gmail.com>2011-08-11 02:38:13 +0530
committerYesudeep Mangalapilly <yesudeep@gmail.com>2011-08-11 02:38:13 +0530
commit2eeea2ca19fdea9f354bbec685e168fee370d19f (patch)
treed780c2c3d49075c3c26ce587c17e5b1c9921f5b0 /rsa/varblock.py
parent0a0116f248a79b404be02689498889e21b0b7dde (diff)
downloadrsa-2eeea2ca19fdea9f354bbec685e168fee370d19f.tar.gz
Porting to Python 3 complete. All tests except pyasn1 stuff pass.
Diffstat (limited to 'rsa/varblock.py')
-rw-r--r--rsa/varblock.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rsa/varblock.py b/rsa/varblock.py
index b8bd899..51e04fc 100644
--- a/rsa/varblock.py
+++ b/rsa/varblock.py
@@ -31,6 +31,7 @@ This file format is called the VARBLOCK format, in line with the varint format
used to denote the block sizes.
'''
+from rsa._compat import byte
VARBLOCK_VERSION = 1
@@ -88,7 +89,7 @@ def write_varint(outfile, value):
if value > 0:
to_write |= 0x80
- outfile.write(chr(to_write))
+ outfile.write(byte(to_write))
written_bytes += 1
return written_bytes