if port is None:
port = 5432
try:
- self.conn = psycopg2.connect("dbname=%s user=%s password=%s host=%s port=%d" % (database, user, password, host, port))
+ self.conn = psycopg2.connect("dbname={0} user={1} password={2} host={3} port={4}".format(database, user, password, host, port))
except psycopg2.Error as e:
raise Exception(e)