[asterisk] s/base64.encodestring/base64.b64encode/
This commit is contained in:
parent
e8cce3624e
commit
22f9ea8cee
1 changed files with 1 additions and 1 deletions
|
@ -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.encodestring(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.b64encode(body).strip() if body_type=='str' else body, user))
|
||||
conn.commit()
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue