summaryrefslogtreecommitdiffstats
path: root/welco/sources/phone/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'welco/sources/phone/views.py')
-rw-r--r--welco/sources/phone/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/welco/sources/phone/views.py b/welco/sources/phone/views.py
index ab9dac4..f04341f 100644
--- a/welco/sources/phone/views.py
+++ b/welco/sources/phone/views.py
@@ -96,7 +96,7 @@ def call_event(request):
assert isinstance(payload['callee'], six.string_types), 'callee must be a string'
if 'data' in payload:
assert isinstance(payload['data'], dict), 'data must be a JSON object'
- except (TypeError, ValueError, AssertionError), e:
+ except (TypeError, ValueError, AssertionError) as e:
return HttpResponseBadRequest(json.dumps({'err': 1, 'msg':
force_text(e)}),
content_type='application/json')
@@ -201,7 +201,7 @@ def take_line(request):
payload = json.loads(request.body)
assert isinstance(payload, dict), 'payload is not a JSON object'
assert payload.keys() == ['callee'], 'payload must have only one key: callee'
- except (TypeError, ValueError, AssertionError), e:
+ except (TypeError, ValueError, AssertionError) as e:
return HttpResponseBadRequest(json.dumps({'err': 1, 'msg':
force_text(e)}),
content_type='application/json')
@@ -222,7 +222,7 @@ def release_line(request):
payload = json.loads(request.body)
assert isinstance(payload, dict), 'payload is not a JSON object'
assert payload.keys() == ['callee'], 'payload must have only one key: callee'
- except (TypeError, ValueError, AssertionError), e:
+ except (TypeError, ValueError, AssertionError) as e:
return HttpResponseBadRequest(json.dumps({'err': 1, 'msg':
force_text(e)}),
content_type='application/json')