Browse Source

Don't fail if Asterisk and asterisk_click2dial aren't installed

pull/8/head
Sandy Carter 10 years ago
committed by Alexis de Lattre
parent
commit
2e1e660c3c
  1. 10
      asterisk_click2dial/asterisk_click2dial.py

10
asterisk_click2dial/asterisk_click2dial.py

@ -24,9 +24,13 @@ from openerp.tools.translate import _
import logging import logging
# Lib for phone number reformating -> pip install phonenumbers # Lib for phone number reformating -> pip install phonenumbers
import phonenumbers import phonenumbers
# Lib py-asterisk from http://code.google.com/p/py-asterisk/
# -> pip install py-Asterisk
from Asterisk import Manager
try:
# Lib py-asterisk from http://code.google.com/p/py-asterisk/
# -> pip install py-Asterisk
from Asterisk import Manager
except ImportError:
Manager = None
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)

Loading…
Cancel
Save