mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Fixed parameters parsing in the connection constructor.
Keyword arguments were silently discarded.
This commit is contained in:
parent
47ff5a6b01
commit
88fe5f91d2
|
@ -757,8 +757,9 @@ connection_init(PyObject *obj, PyObject *args, PyObject *kwds)
|
|||
{
|
||||
const char *dsn;
|
||||
long int async = 0;
|
||||
static char *kwlist[] = {"dsn", "async", NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s|l", &dsn, &async))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|l", kwlist, &dsn, &async))
|
||||
return -1;
|
||||
|
||||
return connection_setup((connectionObject *)obj, dsn, async);
|
||||
|
|
Loading…
Reference in New Issue
Block a user