Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Benjamin Graillot
scripts
Commits
22f9ea8c
Commit
22f9ea8c
authored
Dec 03, 2013
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[asterisk] s/base64.encodestring/base64.b64encode/
parent
e8cce362
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
sip/asterisk.py
sip/asterisk.py
+1
-1
No files found.
sip/asterisk.py
View file @
22f9ea8c
...
...
@@ -101,7 +101,7 @@ class Sms(object):
raise
EnvironmentError
(
"body_type sould be 'str' ou 'base64' not %r"
%
body_type
)
conn
=
psycopg2
.
connect
(
self
.
sql_params
)
cur
=
conn
.
cursor
()
cur
.
execute
(
'INSERT INTO %s (date, "from", "to", body, "user") VALUES (NOW(), %%s, %%s, %%s, %%s)'
%
self
.
database
,
(
src
,
dst
,
base64
.
encode
string
(
body
).
strip
()
if
body_type
==
'str'
else
body
,
user
))
cur
.
execute
(
'INSERT INTO %s (date, "from", "to", body, "user") VALUES (NOW(), %%s, %%s, %%s, %%s)'
%
self
.
database
,
(
src
,
dst
,
base64
.
b64
encode
(
body
).
strip
()
if
body_type
==
'str'
else
body
,
user
))
conn
.
commit
()
cur
.
close
()
conn
.
close
()
...
...
Write
Preview
Markdown
is supported
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