nicholasdavidson / pybit

Python Build Integration Toolkit - a distributed cross platform AMQP based build system
17 stars 5 forks source link

Allow db:port to be null #98

Closed ghost closed 11 years ago

ghost commented 11 years ago

The default localhost installation of postgres will use a unix socket which does not use a port but setting port: null in /etc/pybit/web/web.conf causes an error:

[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1]   File "/usr/share/pybit-web/application.wsgi", line 16, in <module>
[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1]     myDb = Database(settings['db']) # singleton instance
[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1]   File "/usr/lib/python2.6/dist-packages/pybitweb/db.py", line 60, in                   __init__
[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1]     self.connect()
[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1]   File "/usr/lib/python2.6/dist-packages/pybitweb/db.py", line 74, in                   connect
[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1]     port=self.settings['port'], password=self.settings['password'])
[Thu Dec 20 11:33:15 2012] [error] [client 127.0.0.1] TypeError: port must be a string or int