aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/python/pgdb.py
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-04-24 01:58:31 +0000
committerBruce Momjian <bruce@momjian.us>2002-04-24 01:58:31 +0000
commitbe9728acf1395ee45d82aa1e922570a82f9d040f (patch)
tree490fabd2889ca35b0750f6264def5cb8f70f3f84 /src/interfaces/python/pgdb.py
parent2d81019493541d90f601ffb6f1f2cc9841b7aefe (diff)
downloadpostgresql-be9728acf1395ee45d82aa1e922570a82f9d040f.tar.gz
postgresql-be9728acf1395ee45d82aa1e922570a82f9d040f.zip
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
Diffstat (limited to 'src/interfaces/python/pgdb.py')
-rw-r--r--src/interfaces/python/pgdb.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/interfaces/python/pgdb.py b/src/interfaces/python/pgdb.py
index 2772809b4e2..c9a8e47b895 100644
--- a/src/interfaces/python/pgdb.py
+++ b/src/interfaces/python/pgdb.py
@@ -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