Commit d9a680d1 authored by Xiang Li's avatar Xiang Li
Browse files

Update prog.py

parent 311f89ff
......@@ -96,7 +96,7 @@ def afficherTable(conn,table):
sql = "SELECT * FROM "+table
try:
cur.execute(sql)
except psycopg2.Error:
except pg.Error:
print("Execute Error")
conn.rollback()
return
......@@ -111,7 +111,7 @@ def afficherTable(conn,table):
else:
print("Empty table")
conn.commit()
except psycopg2.Error:
except pg.Error:
print("Fetch error")
conn.rollback()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment