Commit be9728ac authored by Bruce Momjian's avatar Bruce Momjian

pgdb.connect() seems to be broken on Python 2.0.1 (which ships with

Slackware 8), and perhaps on other Pythons, haven't checked.  Something in
the _pg.connect() call isn't working.  I think the problem stems from the
fact that 'host' is a named parameter of both _pg.connect and pgdb.connect,
and so Python treats it as a variable assignment, not a named parameter.

Uses non-named parameters.

Andrew Johnson
parent 2d810194
......@@ -379,9 +379,8 @@ def connect(dsn = None, user = None, password = None, host = None, database = No
dbuser = None
# open the connection
cnx = _pg.connect(host = dbhost, dbname = dbbase, port = dbport,
opt = dbopt, tty = dbtty,
user = dbuser, passwd = dbpasswd)
cnx = _pg.connect(dbbase, dbhost, dbport, dbopt,
dbtty, dbuser, dbpasswd)
return pgdbCnx(cnx)
### types handling
......
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