mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
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
This commit is contained in:
parent
2d81019493
commit
be9728acf1
@ -379,9 +379,8 @@ def connect(dsn = None, user = None, password = None, host = None, database = No
|
|||||||
dbuser = None
|
dbuser = None
|
||||||
|
|
||||||
# open the connection
|
# open the connection
|
||||||
cnx = _pg.connect(host = dbhost, dbname = dbbase, port = dbport,
|
cnx = _pg.connect(dbbase, dbhost, dbport, dbopt,
|
||||||
opt = dbopt, tty = dbtty,
|
dbtty, dbuser, dbpasswd)
|
||||||
user = dbuser, passwd = dbpasswd)
|
|
||||||
return pgdbCnx(cnx)
|
return pgdbCnx(cnx)
|
||||||
|
|
||||||
### types handling
|
### types handling
|
||||||
|
Loading…
x
Reference in New Issue
Block a user