We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 872476f commit 466bf2fCopy full SHA for 466bf2f
base_business_document_import/models/business_document_import.py
@@ -5,15 +5,18 @@
5
from openerp import models, api, _
6
from openerp.tools import float_compare
7
from openerp.exceptions import Warning as UserError
8
-import PyPDF2
9
from lxml import etree
10
from StringIO import StringIO
11
import mimetypes
12
from urlparse import urlparse
13
import logging
14
-
15
logger = logging.getLogger(__name__)
16
+try:
+ import PyPDF2
17
+except ImportError:
18
+ logger.debug('Cannot import PyPDF2')
19
+
20
21
class BusinessDocumentImport(models.AbstractModel):
22
_name = 'business.document.import'
0 commit comments