Update of /cvsroot/pythonreports/PythonReports/PythonReports
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3819
Modified Files:
datatypes.py
Log Message:
fix decoding of qp-encoded data
Index: datatypes.py
===================================================================
RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/datatypes.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** datatypes.py 6 Dec 2006 16:22:48 -0000 1.3
--- datatypes.py 7 Dec 2006 19:29:26 -0000 1.4
***************
*** 1,4 ****
--- 1,5 ----
"""Data types and element primitives, common for templates and printouts"""
"""History:
+ 07-dec-2006 [als] fix decoding of qp-encoded data
05-dec-2006 [als] sweep pylint warnings
03-nov-2006 [als] ElementTree: string conversion returns full XML text
***************
*** 1150,1154 ****
_data = binascii.a2b_uu(_data)
elif _encoding == "qp":
! _data = binascii.b2a_qp(_data, True, False)
_compress = element.get("compress")
if _compress == "zlib":
--- 1151,1158 ----
_data = binascii.a2b_uu(_data)
elif _encoding == "qp":
! # .write() adds blank space to encoded data.
! # it must be stripped here or it will be
! # escaped on repeated write
! _data = binascii.a2b_qp(_data.strip())
_compress = element.get("compress")
if _compress == "zlib":
|