[PEAK] Problem with DB connection via domain socket

Phillip J. Eby pje at telecommunity.com
Mon Apr 12 17:55:02 EDT 2004


At 05:10 PM 4/12/04 -0400, Stephen C. Waterbury wrote:
>PEAK's wrapper for psycopg doesn't appear to allow connection
>to the database via a domain socket without a password:
>
>   File "/usr/local/lib/python2.3/site-packages/peak/storage/SQL.py", line 
> 464, in _open
>     return self.API.connect(
>TypeError: argument 3 must be string, not None
>
>.. even though psycopg understands that it doesn't need one:
>
>[waterbug at beeblebrox bulletins]$ python
>Python 2.3.3 (#1, Dec 24 2003, 12:01:08)
>[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
>Type "help", "copyright", "credits" or "license" for more information.
> >>> import psycopg
> >>> conn = psycopg.connect(database='bulletins', user='waterbug')
> >>>
>
>Where should I go to modify this behavior?

You probably want to change the password field to have:

     defaultValue = ''
     emptyOK = True

in its class body.  Then, you should end up with an empty string as the 
password instead of None.




More information about the PEAK mailing list