diff --git a/cmis/models/cmis_backend.py b/cmis/models/cmis_backend.py index c0fb966..1996297 100644 --- a/cmis/models/cmis_backend.py +++ b/cmis/models/cmis_backend.py @@ -4,10 +4,6 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging -import cmislib.exceptions -from cmislib.model import CmisClient -from cmislib.browser.binding import BrowserBinding -from cmislib.exceptions import ObjectNotFoundException from openerp import api, fields, models from openerp.exceptions import UserError @@ -16,6 +12,14 @@ _logger = logging.getLogger(__name__) +try: + import cmislib.exceptions + from cmislib.model import CmisClient + from cmislib.browser.binding import BrowserBinding + from cmislib.exceptions import ObjectNotFoundException +except (ImportError, IOError) as err: + _logger.debug(err) + class CmisBackend(models.Model): _name = 'cmis.backend'