Permalink
Browse files

use 'port' as keyword for pgdb

  • Loading branch information...
1 parent 3861897 commit c5c0e8931b5db468d75438686e4ac4f62a61f6b2 @sandesh247 sandesh247 committed with Sandesh Singh Aug 15, 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 c5c0e89

Please sign in to comment.