Browse Source

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

pull/7/head
Sandy Carter 10 years ago
parent
commit
63267355d4
  1. 10
      asterisk_click2dial/asterisk_click2dial.py

10
asterisk_click2dial/asterisk_click2dial.py

@ -24,9 +24,13 @@ from openerp.tools.translate import _
import logging
# Lib for phone number reformating -> pip install 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__)

Loading…
Cancel
Save