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
07d00b4b
Commit
07d00b4b
authored
Apr 19, 2017
by
okhin
🚴
Browse files
Merge branch '5-fix-unauthorized-calls' into 'master'
Correct syntax for with statement See merge request
!15
parents
2f3bdf6f
c271b573
Pipeline
#939
passed with stage
in 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
07d00b4b
...
...
@@ -149,7 +149,7 @@ def sanitize_phonenumber(number):
# We're checking if we're blacklisted
db
=
sqlite3
.
connect
(
config
[
'piphone'
][
'db'
])
bl_re
=
None
with
blacklist
in
db
.
execute
(
'SELECT pattern, reason FROM blacklist'
).
fetchall
():
with
db
.
execute
(
'SELECT pattern, reason FROM blacklist'
).
fetchall
()
as
blacklist
:
if
bl_re
==
None
:
bl_re
=
'(?P<{reason}>^{pattern})'
.
format
(
pattern
=
blacklist
[
0
],
reason
=
blacklist
[
1
],)
else
:
...
...
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