- Bump twilio requirement to latest 6.19.1 version - The generic response type is gone in the latest versions of the twilio package. It appears we were generating an empty response just to get the empty xml body. TwilML is the new base class all responses inherit from. So I've switched the code over to using and empty TwilML object instead. - The exception type was moved to a different location.
This commit is contained in:
parent
3e5233d115
commit
45878c6df0
3 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ class TwilioCallNotificationService(BaseNotificationService):
|
|||
|
||||
def send_message(self, message="", **kwargs):
|
||||
"""Call to specified target users."""
|
||||
from twilio import TwilioRestException
|
||||
from twilio.base.exceptions import TwilioRestException
|
||||
|
||||
targets = kwargs.get(ATTR_TARGET)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import homeassistant.helpers.config_validation as cv
|
|||
from homeassistant.core import callback
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
|
||||
REQUIREMENTS = ['twilio==5.7.0']
|
||||
REQUIREMENTS = ['twilio==6.19.1']
|
||||
|
||||
DOMAIN = 'twilio'
|
||||
|
||||
|
@ -51,8 +51,8 @@ class TwilioReceiveDataView(HomeAssistantView):
|
|||
@callback
|
||||
def post(self, request): # pylint: disable=no-self-use
|
||||
"""Handle Twilio data post."""
|
||||
from twilio.twiml import Response
|
||||
from twilio.twiml import TwiML
|
||||
hass = request.app['hass']
|
||||
data = yield from request.post()
|
||||
hass.bus.async_fire(RECEIVED_DATA, dict(data))
|
||||
return Response().toxml()
|
||||
return TwiML().to_xml()
|
||||
|
|
|
@ -1485,7 +1485,7 @@ transmissionrpc==0.11
|
|||
tuyapy==0.1.3
|
||||
|
||||
# homeassistant.components.twilio
|
||||
twilio==5.7.0
|
||||
twilio==6.19.1
|
||||
|
||||
# homeassistant.components.sensor.uber
|
||||
uber_rides==0.6.0
|
||||
|
|
Loading…
Add table
Reference in a new issue