diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-11 17:47:05 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-11 17:47:05 +0000 |
commit | 508dce1a34e85702e25e2628f6a90718b6f1a13d (patch) | |
tree | da2f75bc7d40a0cbfdb11db7444ada8f3d96d3c6 /db_proxy.py | |
parent | 6124c3ead6a45ae852ec2b671436a9de0566002a (diff) | |
download | omegle-508dce1a34e85702e25e2628f6a90718b6f1a13d.tar.gz omegle-508dce1a34e85702e25e2628f6a90718b6f1a13d.zip |
dbchange
git-svn-id: http://xapek.org/svn/common/omegle@1116 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'db_proxy.py')
-rw-r--r-- | db_proxy.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/db_proxy.py b/db_proxy.py index 9e5273e..8cb3e55 100644 --- a/db_proxy.py +++ b/db_proxy.py @@ -12,10 +12,9 @@ __all__ = [] class DBThread(Thread): - def __init__(self,conn_str): + def __init__(self,**kwargs): Thread.__init__(self) -# dbconn = ...("dbname='yvesf' user='dbuser' host='localhost' password='dbpass'") - self.conn = pyPgSQL.PgSQL.connect(conn_str, client_encoding="utf-8", unicode_results=1) + self.conn = pyPgSQL.PgSQL.connect(client_encoding="utf-8", unicode_results=1,**kwargs) self.queue = Queue.Queue() self.running = True def run(self): @@ -61,7 +60,7 @@ if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) print "press ctrl-c to abort" - db=DBThread("") + db=DBThread(database="omegle") db.start() try: db.create_table() |