def __init__(self, user=None, host=None, dbname=None, passwd=None): if passwd: conninfo = 'user=%s host=%s dbname=%s password=%s' \ %(user, host, dbname, passwd) else: conninfo = 'user=%s host=%s dbname=%s' %(user, host, dbname) Connection.__init__(self, conninfo)
def __init__(self, user=None, host=None, dbname=None, passwd=None): if passwd: conninfo = 'user=%s host=%s dbname=%s password=%s' \ %(user, host, dbname, passwd) else: conninfo = 'user=%s host=%s dbname=%s' % (user, host, dbname) Connection.__init__(self, conninfo)
def __init__(self, user=None, host=None, dbname=None, passwd=None, port=5432): if passwd: conninfo = 'user=%s host=%s dbname=%s password=%s port=%s' \ %(user, host, dbname, passwd, str(port)) else: conninfo = 'user=%s host=%s dbname=%s port=%s' %(user, host, dbname, str(port)) Connection.__init__(self, conninfo)