X-Git-Url: http://git.datanom.net/pwp.git/blobdiff_plain/e5424f290a1b4f0f9b200e720d19091b63ed3eb2..fc01a3eb12731e8e2512e77b426ab5b33503edd1:/app/DB/postgres.py diff --git a/app/DB/postgres.py b/app/DB/postgres.py index ce2ef23..6a67caa 100644 --- a/app/DB/postgres.py +++ b/app/DB/postgres.py @@ -6,6 +6,6 @@ class Postgres(Base): 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)