comparison idavoll/pgsql_storage.py @ 163:1701c0e2c707

Add --dbpass option for passing a password to the PostgreSQL backend. Author: edwinm Reviewer: ralphm Fixes #1
author Ralph Meijer <ralphm@ik.nu>
date Thu, 07 Sep 2006 11:13:46 +0000
parents 5191ba7c4df8
children ef22e4150caa
comparison
equal deleted inserted replaced
162:84cfe9fe38c5 163:1701c0e2c707
10 10
11 class Storage: 11 class Storage:
12 12
13 implements(storage.IStorage) 13 implements(storage.IStorage)
14 14
15 def __init__(self, user, database): 15 def __init__(self, user, database, password = None):
16 self._dbpool = adbapi.ConnectionPool('pyPgSQL.PgSQL', 16 self._dbpool = adbapi.ConnectionPool('pyPgSQL.PgSQL',
17 user=user, 17 user=user,
18 password=password,
18 database=database, 19 database=database,
19 client_encoding='utf-8' 20 client_encoding='utf-8'
20 ) 21 )
21 22
22 def get_node(self, node_id): 23 def get_node(self, node_id):