protect import of external dependency

This commit is contained in:
Alexandre Fayolle
2015-03-25 13:55:38 +01:00
parent 84fe20e4a0
commit 432ce1c2ee

View File

@@ -25,7 +25,7 @@ IBAN numbers and for consulting.
import re
import urllib
import urllib2
from BeautifulSoup import BeautifulSoup
from openerp.addons.account_banking_iban_lookup.urlagent import (
URLAgent,
SoupForm,
@@ -33,6 +33,11 @@ from openerp.addons.account_banking_iban_lookup.urlagent import (
from openerp.addons.account_banking.sepa.iban import IBAN
from openerp.addons.account_banking.struct import struct
try:
import BeautifulSoup
except ImportError:
BeautifulSoup = None
__all__ = [
'account_info',
'bank_info',