Permalink
Browse files

Merge pull request #173 from sandesh247/master

use 'port' as keyword for pgdb
  • Loading branch information...
2 parents 3861897 + c5c0e89 commit 914ceb79b2756e6e6ca4b692c707ed2718dad377 @aaronsw aaronsw committed Aug 17, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 web/db.py
View
@@ -926,6 +926,8 @@ def __init__(self, **keywords):
if db_module.__name__ == "psycopg2":
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
+ if db_module.__name__ == "pgdb" and 'port' in keywords:
+ keywords["host"] += ":" + str(keywords.pop('port'))
# if db is not provided postgres driver will take it from PGDATABASE environment variable
if 'db' in keywords:

0 comments on commit 914ceb7

Please sign in to comment.