Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
piphone-sip
Commits
ee558e44
Commit
ee558e44
authored
Apr 19, 2017
by
okhin
🚴
Browse files
Merge branch '5-fix-unauthorized-calls' into 'master'
list(dict) seems better than dict.keys See merge request
!20
parents
2f561d76
b7da2f21
Pipeline
#944
passed with stage
in 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
ee558e44
...
...
@@ -159,7 +159,8 @@ def sanitize_phonenumber(number):
groups
=
re
.
match
(
bl_re
,
number
)
if
groups
is
not
None
:
# We matched, so we're blacklisted
raise
ValueError
(
'{} is blacklisted. Reason: {}'
,
(
number
,
groups
.
groupdict
.
keys
[
0
],))
groupdict
=
groups
.
groupdict
()
raise
ValueError
(
'{} is blacklisted. Reason: {}'
,
(
number
,
list
(
groupdict
)[
0
],))
return
number
@
asyncio
.
coroutine
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment