summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshesh Vashi <ashesh.vashi@enterprisedb.com>2018-05-08 15:29:16 +0530
committerAshesh Vashi <ashesh.vashi@enterprisedb.com>2018-05-08 15:29:16 +0530
commit36f0db81d228b612a66abf6c880d1d6629da77fc (patch)
tree72e18ffe6a424896e9488f8b0d64bc7dcf1b29d4
parent1bec2bdc437d89847919889f20825e2ca94c8fa0 (diff)
downloadpsycopg2-36f0db81d228b612a66abf6c880d1d6629da77fc.tar.gz
Fixed the string format error reported by Travis-CI.
Reference: https://travis-ci.org/psycopg/psycopg2/jobs/376288585
-rw-r--r--psycopg/psycopgmodule.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/psycopg/psycopgmodule.c b/psycopg/psycopgmodule.c
index 8b6623a..5ed1c1c 100644
--- a/psycopg/psycopgmodule.c
+++ b/psycopg/psycopgmodule.c
@@ -424,8 +424,6 @@ psyco_encrypt_password(PyObject *self, PyObject *args)
connectionObject *conn = NULL;
- static char *kwlist[] = {"password", "user", "scope", "algorithm", NULL};
-
if (!PyArg_ParseTuple(args, "OO|OO",
&password, &user, &obj, &algorithm)) {
return NULL;
@@ -482,7 +480,7 @@ psyco_encrypt_password(PyObject *self, PyObject *args)
if (!encrypted) {
const char *msg = PQerrorMessage(conn->pgconn);
if (msg && *msg) {
- PyErr_Format(ProgrammingError, msg);
+ PyErr_Format(ProgrammingError, "%s", msg);
res = NULL;
goto exit;
}