Skip to content

Commit afecb0c

Browse files
authored
Update util.py
1 parent 92c81c1 commit afecb0c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: util.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
HOST = "localhost"
77
USER = "postgres"
88
PASSWORD = "xxxxxxxxxxx"
9+
10+
911
def connect_to_database_server(dbname):
1012
"""
11-
Connects to PostgreSQL server database 'dbname' and
13+
Connects to PostgreSQL server database 'dbname' and
1214
returns a connection object and cursor.
1315
"""
1416
try:
1517
conn = psycopg2.connect(host=HOST, database=dbname, user=USER, password=PASSWORD)
16-
cur = conn.cursor()
18+
cur = conn.cursor()
1719
return [conn, cur]
1820
except psycopg2.OperationalError:
1921
return -1

0 commit comments

Comments
 (0)