# HG changeset patch # User Ralph Meijer # Date 1157627626 0 # Node ID 1701c0e2c7070e255e2013d3b73a3fdcd7b754a3 # Parent 84cfe9fe38c51b7c8b1772714d7e1a2fa12ede2e Add --dbpass option for passing a password to the PostgreSQL backend. Author: edwinm Reviewer: ralphm Fixes #1 diff -r 84cfe9fe38c5 -r 1701c0e2c707 NEWS --- a/NEWS Wed Sep 06 12:57:53 2006 +0000 +++ b/NEWS Thu Sep 07 11:13:46 2006 +0000 @@ -5,6 +5,7 @@ - Add new retrieve-default feature for retrieval of default node configuration. - Fully comply with access model 'open'. + - Add --dbpass option for PostgreSQL backend. 0.5.0 (2006-08-17) ================== diff -r 84cfe9fe38c5 -r 1701c0e2c707 idavoll/idavoll.py --- a/idavoll/idavoll.py Wed Sep 06 12:57:53 2006 +0000 +++ b/idavoll/idavoll.py Thu Sep 07 11:13:46 2006 +0000 @@ -144,7 +144,8 @@ if config['backend'] == 'pgsql': import pgsql_storage st = pgsql_storage.Storage(user=config['dbuser'], - database=config['dbname']) + database=config['dbname'], + password=config['dbpass']) elif config['backend'] == 'memory': import memory_storage st = memory_storage.Storage() diff -r 84cfe9fe38c5 -r 1701c0e2c707 idavoll/pgsql_storage.py --- a/idavoll/pgsql_storage.py Wed Sep 06 12:57:53 2006 +0000 +++ b/idavoll/pgsql_storage.py Thu Sep 07 11:13:46 2006 +0000 @@ -12,9 +12,10 @@ implements(storage.IStorage) - def __init__(self, user, database): + def __init__(self, user, database, password = None): self._dbpool = adbapi.ConnectionPool('pyPgSQL.PgSQL', user=user, + password=password, database=database, client_encoding='utf-8' ) diff -r 84cfe9fe38c5 -r 1701c0e2c707 idavoll/tap.py --- a/idavoll/tap.py Wed Sep 06 12:57:53 2006 +0000 +++ b/idavoll/tap.py Thu Sep 07 11:13:46 2006 +0000 @@ -15,6 +15,7 @@ ('backend', None, 'memory'), ('dbuser', None, ''), ('dbname', None, 'pubsub'), + ('dbpass', None, ''), ] optFlags = [