[Trac-tickets] [The Trac Project] #2308: custom port unhandled while using psycopg

The Trac Project noreply at edgewall.com
Fri Nov 4 16:54:53 CST 2005


#2308: custom port unhandled while using psycopg
--------------------------------------------+-------------------------------
 Reporter:  Marcin.Kasperski at softax.com.pl  |       Owner:  daniel
     Type:  defect                          |      Status:  new   
 Priority:  normal                          |   Milestone:        
Component:  trac-admin                      |     Version:  0.9   
 Severity:  normal                          |   Keywords:                                  |  
--------------------------------------------+-------------------------------
 I tried using trac-admin with the following database string:
 postgres://USER:PWD@localhost:5433/DBNAME
 but it occured that I get connection failures mentioning ... port 5432.

 Quick look at the code of site-packages/trac/db.py shows why:
 {{{
 #!python
         if psycopg:
             dsn = []
             if path:
                 dsn.append('dbname=' + path)
             if user:
                 dsn.append('user=' + user)
             if password:
                 dsn.append('password=' + password)
             if host:
                 dsn.append('host=' + host)
             cnx = psycopg.connect(' '.join(dsn))
 }}}
 There is no if for port option!

 Observed on trac from debian unstable (0.9.1)

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2308>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list