]> git.datanom.net - pwp.git/blobdiff - app/DB/postgres.py
Half way through migration away from sqlalchemy
[pwp.git] / app / DB / postgres.py
index ce2ef23db2214ec74237e792b602c635fcd578e9..6a67caabfa7b9f6586d19110ac9511b5ee29b8c2 100644 (file)
@@ -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)
This page took 0.044833 seconds and 5 git commands to generate.