summaryrefslogtreecommitdiff
path: root/addons/document
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-18 16:33:10 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commitc24ab97c52d8ac1759c47cbe5d01eedfcded33fc (patch)
treee7e1d207acff8d48a83869a518c6a4cf3ffed5e2 /addons/document
parent30a9e6602cbb260d169372407c89463907e56d26 (diff)
[FIX] P3: bytes.startswith(bytes)
Diffstat (limited to 'addons/document')
-rw-r--r--addons/document/models/ir_attachment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/document/models/ir_attachment.py b/addons/document/models/ir_attachment.py
index 7e1afe36e4e..2bc6aee234d 100644
--- a/addons/document/models/ir_attachment.py
+++ b/addons/document/models/ir_attachment.py
@@ -93,7 +93,7 @@ class IrAttachment(models.Model):
'''Index PDF documents'''
buf = u""
- if bin_data.startswith('%PDF-'):
+ if bin_data.startswith(b'%PDF-'):
f = io.BytesIO(bin_data)
try:
pdf = PyPDF2.PdfFileReader(f, overwriteWarnings=False)