Commit 22f9ea8c authored by Valentin Samir's avatar Valentin Samir

[asterisk] s/base64.encodestring/base64.b64encode/

parent e8cce362
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment