summaryrefslogtreecommitdiffstats
path: root/Lib/encodings
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-11-07 12:06:19 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-11-07 12:06:19 (GMT)
commit85e7066278775ca762215186edb117fb2c7cc2dc (patch)
treee876bf8f41132e893d3519e3cfd078ecf57f9139 /Lib/encodings
parent57b967791a552656f4c21a4af283788269d06d83 (diff)
parent519114df4258f17bc33a31c6c1614fd82e2ab0be (diff)
downloadcpython-85e7066278775ca762215186edb117fb2c7cc2dc.zip
cpython-85e7066278775ca762215186edb117fb2c7cc2dc.tar.gz
cpython-85e7066278775ca762215186edb117fb2c7cc2dc.tar.bz2
Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
Based on patch by Martin Panter.
Diffstat (limited to 'Lib/encodings')
-rw-r--r--Lib/encodings/uu_codec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/encodings/uu_codec.py b/Lib/encodings/uu_codec.py
index 1454095..2a5728f 100644
--- a/Lib/encodings/uu_codec.py
+++ b/Lib/encodings/uu_codec.py
@@ -54,7 +54,7 @@ def uu_decode(input, errors='strict'):
data = binascii.a2b_uu(s)
except binascii.Error as v:
# Workaround for broken uuencoders by /Fredrik Lundh
- nbytes = (((ord(s[0])-32) & 63) * 4 + 5) / 3
+ nbytes = (((s[0]-32) & 63) * 4 + 5) // 3
data = binascii.a2b_uu(s[:nbytes])
#sys.stderr.write("Warning: %s\n" % str(v))
write(data)