Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use 'port' as keyword for pgdb

  • Loading branch information...
commit c5c0e8931b5db468d75438686e4ac4f62a61f6b2 1 parent 3861897
@sandesh247 sandesh247 authored Sandesh Singh committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  web/db.py
View
2  web/db.py
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.