mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Fixed the string format error reported by Travis-CI.
Reference: https://travis-ci.org/psycopg/psycopg2/jobs/376288585
This commit is contained in:
parent
1bec2bdc43
commit
36f0db81d2
|
@ -424,8 +424,6 @@ psyco_encrypt_password(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
connectionObject *conn = NULL;
|
connectionObject *conn = NULL;
|
||||||
|
|
||||||
static char *kwlist[] = {"password", "user", "scope", "algorithm", NULL};
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "OO|OO",
|
if (!PyArg_ParseTuple(args, "OO|OO",
|
||||||
&password, &user, &obj, &algorithm)) {
|
&password, &user, &obj, &algorithm)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -482,7 +480,7 @@ psyco_encrypt_password(PyObject *self, PyObject *args)
|
||||||
if (!encrypted) {
|
if (!encrypted) {
|
||||||
const char *msg = PQerrorMessage(conn->pgconn);
|
const char *msg = PQerrorMessage(conn->pgconn);
|
||||||
if (msg && *msg) {
|
if (msg && *msg) {
|
||||||
PyErr_Format(ProgrammingError, msg);
|
PyErr_Format(ProgrammingError, "%s", msg);
|
||||||
res = NULL;
|
res = NULL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user