Skip to content

Commit be9728a

Browse files
committed
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
1 parent 2d81019 commit be9728a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/interfaces/python/pgdb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,8 @@ def connect(dsn = None, user = None, password = None, host = None, database = No
379379
dbuser = None
380380

381381
# open the connection
382-
cnx = _pg.connect(host = dbhost, dbname = dbbase, port = dbport,
383-
opt = dbopt, tty = dbtty,
384-
user = dbuser, passwd = dbpasswd)
382+
cnx = _pg.connect(dbbase, dbhost, dbport, dbopt,
383+
dbtty, dbuser, dbpasswd)
385384
return pgdbCnx(cnx)
386385

387386
### types handling

0 commit comments

Comments
 (0)