From a2ad39594248292ff1e632e22c8c5ff15ea6196c Mon Sep 17 00:00:00 2001 From: Vera Lukman Date: Wed, 14 Nov 2012 17:13:40 -0800 Subject: [PATCH] Changed method and wait_method to accept None. Some libraries, such as django-twilio, would pass-in None as value to method and wait_method. This is needed so they would work. --- twilio/twiml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twilio/twiml.py b/twilio/twiml.py index 4042621033..52d325cd6c 100644 --- a/twilio/twiml.py +++ b/twilio/twiml.py @@ -22,11 +22,11 @@ def __init__(self, **kwargs): self.verbs = [] self.attrs = {} - if kwargs.get("waitMethod", "GET") not in ["GET", "POST"]: + if kwargs.get("waitMethod", None) not in [None, "GET", "POST"]: raise TwimlException("Invalid waitMethod parameter, " "must be 'GET' or 'POST'") - if kwargs.get("method", "GET") not in ["GET", "POST"]: + if kwargs.get("method", None) not in [None, "GET", "POST"]: raise TwimlException("Invalid method parameter, " "must be 'GET' or 'POST'")