fix travis (flake8)

This commit is contained in:
Alexandre Fayolle 2015-03-03 14:24:44 +01:00 committed by tarteo
parent 93d869064f
commit 8347872a76

View File

@ -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]))