mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
[FIX] Update Travis and fix PEP8
This commit is contained in:
parent
ac32e340c3
commit
e7e0ff440c
@ -4,8 +4,9 @@ python:
|
|||||||
- "2.7"
|
- "2.7"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- VERSION="7.0" ODOO_REPO="odoo/odoo"
|
- VERSION="7.0" LINT_CHECK=1
|
||||||
- VERSION="7.0" ODOO_REPO="OCA/OCB"
|
- VERSION="7.0" ODOO_REPO="odoo/odoo" LINT_CHECK=0
|
||||||
|
- VERSION="7.0" ODOO_REPO="OCA/OCB" LINT_CHECK=0
|
||||||
|
|
||||||
virtualenv:
|
virtualenv:
|
||||||
system_site_packages: true
|
system_site_packages: true
|
||||||
|
@ -49,8 +49,8 @@ class IrAttachment(Model):
|
|||||||
try:
|
try:
|
||||||
import magic
|
import magic
|
||||||
ms = magic.open(
|
ms = magic.open(
|
||||||
hasattr(magic, 'MAGIC_MIME_TYPE')
|
hasattr(magic, 'MAGIC_MIME_TYPE') and
|
||||||
and magic.MAGIC_MIME_TYPE or magic.MAGIC_MIME)
|
magic.MAGIC_MIME_TYPE or magic.MAGIC_MIME)
|
||||||
ms.load()
|
ms.load()
|
||||||
mimetype = ms.buffer(
|
mimetype = ms.buffer(
|
||||||
base64.b64decode(this[binary_field]))
|
base64.b64decode(this[binary_field]))
|
||||||
|
Loading…
Reference in New Issue
Block a user